From 9cf7418cd577c07506ef14f17e6f12458718fec8 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Mon, 12 Mar 2012 10:50:20 -0500 Subject: [PATCH] Build in the Mac el-torito if present Patch from Matthew Garrett --- src/pypungi/__init__.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/pypungi/__init__.py b/src/pypungi/__init__.py index 5d79fe7c..650eb35b 100644 --- a/src/pypungi/__init__.py +++ b/src/pypungi/__init__.py @@ -1006,6 +1006,9 @@ class Pungi(pypungi.PungiBase): efibootargs = ['-eltorito-alt-boot', '-e', 'images/efiboot.img', '-no-emul-boot'] + macbootargs = ['-eltorito-alt-boot', '-e', 'images/macboot.img', + '-no-emul-boot'] + ia64bootargs = ['-b', 'images/boot.img', '-no-emul-boot'] ppcbootargs = ['-part', '-hfs', '-r', '-l', '-sysid', 'PPC', '-no-desktop', '-allow-multidot', '-chrp-boot'] @@ -1020,6 +1023,8 @@ class Pungi(pypungi.PungiBase): sparcbootargs = ['-G', '/boot/isofs.b', '-B', '...', '-s', '/boot/silo.conf', '-sparc-label', '"sparc"'] + isohybrid = ['/usr/bin/isohybrid'] + # Check the size of the tree # This size checking method may be bunk, accepting patches... if not self.config.get('pungi', 'arch') == 'source': @@ -1048,6 +1053,10 @@ class Pungi(pypungi.PungiBase): extraargs.extend(x86bootargs) if self.config.get('pungi', 'arch') == 'x86_64': extraargs.extend(efibootargs) + isohybrid.append('-u') + if os.path.exists(os.path.join(self.topdir, 'images', 'macboot.img')): + extraargs.extend(macbootargs) + isohybrid.append('-m') elif self.config.get('pungi', 'arch') == 'ia64': extraargs.extend(ia64bootargs) elif self.config.get('pungi', 'arch').startswith('ppc'): @@ -1063,7 +1072,9 @@ class Pungi(pypungi.PungiBase): self.config.get('pungi', 'version'), self.config.get('pungi', 'arch'))) extraargs.extend(['-o', isofile]) - + + isohybrid.append(isofile) + if not self.config.get('pungi', 'arch') == 'source': extraargs.append(self.topdir) else: @@ -1074,7 +1085,7 @@ class Pungi(pypungi.PungiBase): # Run isohybrid on the iso if os.path.exists("/usr/bin/isohybrid"): - subprocess.call(["/usr/bin/isohybrid", isofile]) + pypungi.util._doRunCommand(isohybrid, self.logger) # implant md5 for mediacheck on all but source arches if not self.config.get('pungi', 'arch') == 'source':