Build in the Mac el-torito if present

Patch from Matthew Garrett <mjg@redhat.com>
This commit is contained in:
Dennis Gilmore 2012-03-12 10:50:20 -05:00
parent 0857d30f82
commit 9cf7418cd5

View File

@ -1006,6 +1006,9 @@ class Pungi(pypungi.PungiBase):
efibootargs = ['-eltorito-alt-boot', '-e', 'images/efiboot.img', efibootargs = ['-eltorito-alt-boot', '-e', 'images/efiboot.img',
'-no-emul-boot'] '-no-emul-boot']
macbootargs = ['-eltorito-alt-boot', '-e', 'images/macboot.img',
'-no-emul-boot']
ia64bootargs = ['-b', 'images/boot.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'] 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"'] sparcbootargs = ['-G', '/boot/isofs.b', '-B', '...', '-s', '/boot/silo.conf', '-sparc-label', '"sparc"']
isohybrid = ['/usr/bin/isohybrid']
# Check the size of the tree # Check the size of the tree
# This size checking method may be bunk, accepting patches... # This size checking method may be bunk, accepting patches...
if not self.config.get('pungi', 'arch') == 'source': if not self.config.get('pungi', 'arch') == 'source':
@ -1048,6 +1053,10 @@ class Pungi(pypungi.PungiBase):
extraargs.extend(x86bootargs) extraargs.extend(x86bootargs)
if self.config.get('pungi', 'arch') == 'x86_64': if self.config.get('pungi', 'arch') == 'x86_64':
extraargs.extend(efibootargs) 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': elif self.config.get('pungi', 'arch') == 'ia64':
extraargs.extend(ia64bootargs) extraargs.extend(ia64bootargs)
elif self.config.get('pungi', 'arch').startswith('ppc'): elif self.config.get('pungi', 'arch').startswith('ppc'):
@ -1064,6 +1073,8 @@ class Pungi(pypungi.PungiBase):
extraargs.extend(['-o', isofile]) extraargs.extend(['-o', isofile])
isohybrid.append(isofile)
if not self.config.get('pungi', 'arch') == 'source': if not self.config.get('pungi', 'arch') == 'source':
extraargs.append(self.topdir) extraargs.append(self.topdir)
else: else:
@ -1074,7 +1085,7 @@ class Pungi(pypungi.PungiBase):
# Run isohybrid on the iso # Run isohybrid on the iso
if os.path.exists("/usr/bin/isohybrid"): 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 # implant md5 for mediacheck on all but source arches
if not self.config.get('pungi', 'arch') == 'source': if not self.config.get('pungi', 'arch') == 'source':