rename runtime "anaconda-squashfs.img", pass path to Treebuilder

dracut's dmsquash-live-root won't recognize the image as a squashfs live
image unless its name matches "*squashfs.img", so choose the filename
accordingly. Then pass the name to the TreeBuilder so it can move it
into place.
This commit is contained in:
Will Woods 2011-06-22 19:23:21 -04:00
parent d322180dce
commit eda011a49c
2 changed files with 6 additions and 5 deletions

View File

@ -219,14 +219,15 @@ class Lorax(BaseLoraxClass):
rb.cleanup() rb.cleanup()
logger.info("creating the runtime image") logger.info("creating the runtime image")
runtime = joinpaths(self.workdir, "install.img") # NOTE: dracut dmsquash-live-root requires image named "*squashfs.img"
runtime = "images/anaconda-squashfs.img"
# FIXME: compression options (type, speed, etc.) # FIXME: compression options (type, speed, etc.)
rb.create_runtime(runtime) rb.create_runtime(joinpaths(installroot,runtime))
logger.info("preparing to build output tree and boot images") logger.info("preparing to build output tree and boot images")
treebuilder = TreeBuilder(product=self.product, arch=self.arch, treebuilder = TreeBuilder(product=self.product, arch=self.arch,
inroot=installroot, outroot=self.outputdir, inroot=installroot, outroot=self.outputdir,
templatedir=templatedir) runtime=runtime, templatedir=templatedir)
logger.info("rebuilding initramfs images") logger.info("rebuilding initramfs images")
treebuilder.rebuild_initrds(add_args=["--xz"]) treebuilder.rebuild_initrds(add_args=["--xz"])

View File

@ -142,9 +142,9 @@ class RuntimeBuilder(object):
class TreeBuilder(object): class TreeBuilder(object):
'''Builds the arch-specific boot images. '''Builds the arch-specific boot images.
inroot should be the installtree root (the newly-built runtime dir)''' inroot should be the installtree root (the newly-built runtime dir)'''
def __init__(self, product, arch, inroot, outroot, templatedir=None): def __init__(self, product, arch, inroot, outroot, runtime, templatedir=None):
v = DataHolder(arch=arch, product=product, v = DataHolder(arch=arch, product=product,
inroot=inroot, outroot=outroot, inroot=inroot, outroot=outroot, runtime=runtime,
basearch=arch.basearch, libdir=arch.libdir, basearch=arch.basearch, libdir=arch.libdir,
exists = lambda p: _exists(p, root=inroot)) exists = lambda p: _exists(p, root=inroot))
self.vars = v self.vars = v