summaryrefslogtreecommitdiffstats
path: root/py/mock.py
diff options
context:
space:
mode:
authorMichael E Brown <mebrown@michaels-house.net>2007-12-12 16:20:23 -0600
committerMichael E Brown <mebrown@michaels-house.net>2007-12-12 16:20:23 -0600
commit7e35a8aa542afcdc2f1ea7a69bd435e75bd9c40c (patch)
tree458d02603d791e53a405d5082c0b408c57b94ab2 /py/mock.py
parentd16aaf3b7736e4a23e82bc455c4a09d05259a1b7 (diff)
downloadmock-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-xpy/mock.py10
1 files changed, 6 insertions, 4 deletions
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)