diff options
author | Michael E Brown <mebrown@michaels-house.net> | 2007-12-12 16:20:23 -0600 |
---|---|---|
committer | Michael E Brown <mebrown@michaels-house.net> | 2007-12-12 16:20:23 -0600 |
commit | 7e35a8aa542afcdc2f1ea7a69bd435e75bd9c40c (patch) | |
tree | 458d02603d791e53a405d5082c0b408c57b94ab2 /py/mock.py | |
parent | d16aaf3b7736e4a23e82bc455c4a09d05259a1b7 (diff) | |
download | mock-7e35a8aa542afcdc2f1ea7a69bd435e75bd9c40c.tar.gz mock-7e35a8aa542afcdc2f1ea7a69bd435e75bd9c40c.tar.xz mock-7e35a8aa542afcdc2f1ea7a69bd435e75bd9c40c.zip |
separate out shell and chroot cmdline args.
Diffstat (limited to 'py/mock.py')
-rwxr-xr-x | py/mock.py | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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) |