Add --noupgrade option
This commit is contained in:
parent
6110470e51
commit
263618e12a
@ -135,7 +135,7 @@ class Lorax(BaseLoraxClass):
|
|||||||
|
|
||||||
def run(self, ybo, product, version, release, variant="", bugurl="",
|
def run(self, ybo, product, version, release, variant="", bugurl="",
|
||||||
isfinal=False, workdir=None, outputdir=None, buildarch=None, volid=None,
|
isfinal=False, workdir=None, outputdir=None, buildarch=None, volid=None,
|
||||||
domacboot=True, remove_temp=False):
|
domacboot=True, doupgrade=True, remove_temp=False):
|
||||||
|
|
||||||
assert self._configured
|
assert self._configured
|
||||||
|
|
||||||
@ -283,19 +283,20 @@ class Lorax(BaseLoraxClass):
|
|||||||
anaconda_args = dracut_args + ["--add", "anaconda pollcdrom"]
|
anaconda_args = dracut_args + ["--add", "anaconda pollcdrom"]
|
||||||
treebuilder.rebuild_initrds(add_args=anaconda_args)
|
treebuilder.rebuild_initrds(add_args=anaconda_args)
|
||||||
|
|
||||||
# Build upgrade.img. It'd be nice if these could coexist in the same
|
if doupgrade:
|
||||||
# image, but that would increase the size of the anaconda initramfs,
|
# Build upgrade.img. It'd be nice if these could coexist in the same
|
||||||
# which worries some people (esp. PPC tftpboot). So they're separate.
|
# image, but that would increase the size of the anaconda initramfs,
|
||||||
try:
|
# which worries some people (esp. PPC tftpboot). So they're separate.
|
||||||
# If possible, use the 'fedup' plymouth theme
|
try:
|
||||||
themes = runcmd_output(['plymouth-set-default-theme', '--list'],
|
# If possible, use the 'fedup' plymouth theme
|
||||||
root=installroot)
|
themes = runcmd_output(['plymouth-set-default-theme', '--list'],
|
||||||
if 'fedup' in themes.splitlines():
|
root=installroot)
|
||||||
os.environ['PLYMOUTH_THEME_NAME'] = 'fedup'
|
if 'fedup' in themes.splitlines():
|
||||||
except RuntimeError:
|
os.environ['PLYMOUTH_THEME_NAME'] = 'fedup'
|
||||||
pass
|
except RuntimeError:
|
||||||
upgrade_args = dracut_args + ["--add", "system-upgrade"]
|
pass
|
||||||
treebuilder.rebuild_initrds(add_args=upgrade_args, prefix="upgrade")
|
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")
|
logger.info("populating output tree and building boot images")
|
||||||
treebuilder.build()
|
treebuilder.build()
|
||||||
|
@ -107,6 +107,8 @@ def main(args):
|
|||||||
help="volume id", metavar="STRING")
|
help="volume id", metavar="STRING")
|
||||||
optional.add_option("--nomacboot", help="",
|
optional.add_option("--nomacboot", help="",
|
||||||
action="store_false", default=True, dest="domacboot")
|
action="store_false", default=True, dest="domacboot")
|
||||||
|
optional.add_option("--noupgrade", help="",
|
||||||
|
action="store_false", default=True, dest="doupgrade")
|
||||||
optional.add_option("--logfile", default="./lorax.log",
|
optional.add_option("--logfile", default="./lorax.log",
|
||||||
help="Path to logfile")
|
help="Path to logfile")
|
||||||
optional.add_option("--tmp", default="/var/tmp",
|
optional.add_option("--tmp", default="/var/tmp",
|
||||||
@ -169,7 +171,8 @@ def main(args):
|
|||||||
lorax.run(yb, opts.product, opts.version, opts.release,
|
lorax.run(yb, opts.product, opts.version, opts.release,
|
||||||
opts.variant, opts.bugurl, opts.isfinal,
|
opts.variant, opts.bugurl, opts.isfinal,
|
||||||
workdir=tempdir, outputdir=outputdir, buildarch=opts.buildarch,
|
workdir=tempdir, outputdir=outputdir, buildarch=opts.buildarch,
|
||||||
volid=opts.volid, domacboot=opts.domacboot, remove_temp=True)
|
volid=opts.volid, domacboot=opts.domacboot, doupgrade=opts.doupgrade,
|
||||||
|
remove_temp=True)
|
||||||
|
|
||||||
|
|
||||||
def get_yum_base_object(installroot, repositories, mirrorlists=[],
|
def get_yum_base_object(installroot, repositories, mirrorlists=[],
|
||||||
|
Loading…
Reference in New Issue
Block a user