On Thu, May 17, 2012 at 05:33:30PM +0200, Martin Gracik wrote: > Needed for systems without hfsplus support. > --- > share/efi.tmpl | 4 +++- > share/x86.tmpl | 3 ++- > src/pylorax/__init__.py | 4 ++-- > src/pylorax/treebuilder.py | 4 ++-- > src/sbin/lorax | 4 +++- > 5 files changed, 12 insertions(+), 7 deletions(-) > > diff --git a/share/efi.tmpl b/share/efi.tmpl > index add28ee..1350ebc 100644 > --- a/share/efi.tmpl > +++ b/share/efi.tmpl > @@ -11,7 +11,9 @@ install boot/grub/splash.xpm.gz ${EFIBOOTDIR} > > ## actually make the EFI images > ${make_efiboot("images/efiboot.img")} > -${make_efiboot("images/macboot.img", imgtype="apple")} > +%if domacboot: > + ${make_efiboot("images/macboot.img", imgtype="apple")} > +%endif > > ## This is kinda gross, but then... so's EFI. > <%def name="make_efiboot(img, include_kernel=False, disk=False, imgtype='default')"> > diff --git a/share/x86.tmpl b/share/x86.tmpl > index ceeac8f..accbcf2 100644 > --- a/share/x86.tmpl > +++ b/share/x86.tmpl > @@ -53,7 +53,8 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR} > <% > efiarch = 'X64' if basearch=='x86_64' else 'IA32' > efigraft="EFI/BOOT={0}/EFI/BOOT".format(outroot) > - for img in ("images/efiboot.img", "images/macboot.img"): > + images = ("images/efiboot.img", "images/macboot.img") if domacboot else ("images/efiboot.img",) > + for img in images: This form of if is hard to read. I'd do this instead: images = ["images/efiboot.img"] if domacboot: images.append("images/macboot.img") > --- a/src/pylorax/treebuilder.py > +++ b/src/pylorax/treebuilder.py > @@ -151,14 +151,14 @@ class RuntimeBuilder(object): > class TreeBuilder(object): > '''Builds the arch-specific boot images. > inroot should be the installtree root (the newly-built runtime dir)''' > - def __init__(self, product, arch, inroot, outroot, runtime, isolabel, templatedir=None): > + def __init__(self, product, arch, inroot, outroot, runtime, isolabel, domacboot, templatedir=None): This should default to True to keep from breaking things that use TreeBuilder and haven't updated their init call.. The rest of it looks good. -- Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
Attachment:
pgp24CZLS7uSJ.pgp
Description: PGP signature
_______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list