From bead02ddf117a3d6593e0f3a86ddda5d6139ddf8 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 12 Dec 2007 12:15:41 -0500 Subject: Add --update call, to update existing buildroot. Useful for things like pungi which continuously reuse a buildroot --- py/mock.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'py/mock.py') diff --git a/py/mock.py b/py/mock.py index c4b9a68..75d4104 100755 --- a/py/mock.py +++ b/py/mock.py @@ -83,6 +83,9 @@ def command_parse(config_opts): parser.add_option("--install", action="store_const", const="install", dest="mode", help="install packages using yum") + parser.add_option("--update", action="store_const", const="update", + dest="mode", + help="update installed packages using yum") parser.add_option("--orphanskill", action="store_const", const="orphanskill", dest="mode", help="Kill all processes using specified buildroot.") @@ -150,7 +153,7 @@ def command_parse(config_opts): (options, args) = parser.parse_args() if len(args) and args[0] in ('chroot', 'shell', - 'rebuild', 'install', 'installdeps', 'init', 'clean'): + 'rebuild', 'install', 'update', 'installdeps', 'init', 'clean'): options.mode = args[0] args = args[1:] @@ -512,6 +515,9 @@ def main(ret): chroot.tryLockBuildRoot() chroot.yumInstall(*args) + + elif options.mode == 'update': + chroot.yumUpdate() elif options.mode == 'rebuild': do_rebuild(config_opts, chroot, args) -- cgit From dc5948117b2848be2dfa8984cd78fe5d1694aa0c Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 12 Dec 2007 12:45:47 -0500 Subject: Don't provide backwards compat option for update. --- py/mock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'py/mock.py') diff --git a/py/mock.py b/py/mock.py index 75d4104..85332c8 100755 --- a/py/mock.py +++ b/py/mock.py @@ -153,7 +153,7 @@ def command_parse(config_opts): (options, args) = parser.parse_args() if len(args) and args[0] in ('chroot', 'shell', - 'rebuild', 'install', 'update', 'installdeps', 'init', 'clean'): + 'rebuild', 'install', 'installdeps', 'init', 'clean'): options.mode = args[0] args = args[1:] -- cgit