From 7e35a8aa542afcdc2f1ea7a69bd435e75bd9c40c Mon Sep 17 00:00:00 2001 From: Michael E Brown Date: Wed, 12 Dec 2007 16:20:23 -0600 Subject: separate out shell and chroot cmdline args. --- py/mock.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'py/mock.py') diff --git a/py/mock.py b/py/mock.py index 8b2a71f..1ae9a9b 100755 --- a/py/mock.py +++ b/py/mock.py @@ -68,10 +68,13 @@ def command_parse(config_opts): parser.add_option("--rebuild", action="store_const", const="rebuild", dest="mode", default='rebuild', help="rebuild the specified SRPM(s)") - parser.add_option("--chroot", "--shell", action="store_const", + parser.add_option("--shell", action="store_const", const="shell", dest="mode", - help="run the specified command within the chroot." + help="run the specified command interactively within the chroot." " Default command: /bin/sh") + parser.add_option("--chroot", action="store_const", + const="chroot", dest="mode", + help="run the specified command noninteractively within the chroot.") parser.add_option("--clean", action="store_const", const="clean", dest="mode", help="completely remove the specified chroot") @@ -487,9 +490,8 @@ def main(ret): if len(args) == 0: log.critical("You must specify a command to run") sys.exit(50) - else: - log.info("Running in chroot: %s" % args) + log.info("Running in chroot: %s" % args) chroot.tryLockBuildRoot() chroot._resetLogging() chroot.doChroot(args) -- cgit