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
1 changed files with 13 additions and 2 deletions

View File

@ -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':