| |
@@ -6853,6 +6853,8 @@
|
| |
help=_("Print the ID of the runroot task"))
|
| |
parser.add_option("--use-shell", action="store_true", default=False,
|
| |
help=_("Run command through a shell, otherwise uses exec"))
|
| |
+ parser.add_option("--new-chroot", action="store_true", default=False,
|
| |
+ help=_("Run command with the --new-chroot (systemd-nspawn) option to mock"))
|
| |
parser.add_option("--repo-id", type="int", help=_("ID of the repo to use"))
|
| |
|
| |
(opts, args) = parser.parse_args(args)
|
| |
@@ -6868,12 +6870,18 @@
|
| |
else:
|
| |
command = args[2:]
|
| |
try:
|
| |
- task_id = session.runroot(tag, arch, command,
|
| |
- channel=opts.channel_override,
|
| |
- packages=opts.package, mounts=opts.mount,
|
| |
- repo_id=opts.repo_id,
|
| |
- skip_setarch=opts.skip_setarch,
|
| |
- weight=opts.weight)
|
| |
+ kwargs = { 'channel': opts.channel_override,
|
| |
+ 'packages': opts.package,
|
| |
+ 'mounts': opts.mount,
|
| |
+ 'repo_id': opts.repo_id,
|
| |
+ 'skip_setarch': opts.skip_setarch,
|
| |
+ 'weight': opts.weight }
|
| |
+ # Only pass this kwarg if it is true - this prevents confusing older
|
| |
+ # builders with a different function signature
|
| |
+ if opts.new_chroot:
|
| |
+ kwargs['new_chroot'] = True
|
| |
+
|
| |
+ task_id = session.runroot(tag, arch, command, **kwargs)
|
| |
except koji.GenericError, e:
|
| |
if 'Invalid method' in str(e):
|
| |
print "* The runroot plugin appears to not be installed on the",
|
| |