build fedup upgrade.img

Use rebuild_initrds() with prefix='upgrade' to build upgrade.img with
the fedup "system-upgrade" module(s) inside.
This commit is contained in:
Will Woods 2012-11-13 01:33:16 -05:00 committed by Dennis Gilmore
parent 1c91eab12b
commit b5eb38ae97
2 changed files with 13 additions and 3 deletions

View File

@ -48,6 +48,9 @@ installpkg plymouth
## extra dracut modules
installpkg dracut-network anaconda-dracut
## fedup-dracut handles upgrades
installpkg fedup-dracut fedup-dracut-plymouth *-fedup-dracut
## rpcbind or portmap needed by dracut nfs module
installpkg rpcbind

View File

@ -278,9 +278,16 @@ class Lorax(BaseLoraxClass):
domacboot=domacboot, templatedir=templatedir)
logger.info("rebuilding initramfs images")
dracut_args=["--xz", "--add", "anaconda pollcdrom",
"--install", "/.buildstamp"]
treebuilder.rebuild_initrds(add_args=dracut_args)
dracut_args = ["--xz", "--install", "/.buildstamp"]
anaconda_args = dracut_args + ["--add", "anaconda pollcdrom"]
treebuilder.rebuild_initrds(add_args=anaconda_args)
# Build upgrade.img. It'd be nice if these could coexist in the same
# image, but that would increase the size of the anaconda initramfs,
# which worries some people (esp. PPC tftpboot). So they're separate.
upgrade_args = dracut_args + ["--add", "system-upgrade"]
treebuilder.rebuild_initrds(add_args=upgrade_args, prefix="upgrade")
logger.info("populating output tree and building boot images")
treebuilder.build()