mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-16 10:36:13 +01:00
append --norootforbuild as default
pass opts to run_build and check if norootforbuild needs to be appended to cmd. (if opts.userootforbuild is not set)
This commit is contained in:
parent
efbc60f147
commit
9849112278
@ -537,7 +537,7 @@ def calculate_build_root(apihost, prj, pac, repo, arch):
|
|||||||
% {'repo': repo, 'arch': arch, 'project': prj, 'package': pac, 'apihost': apihost}
|
% {'repo': repo, 'arch': arch, 'project': prj, 'package': pac, 'apihost': apihost}
|
||||||
return buildroot
|
return buildroot
|
||||||
|
|
||||||
def run_build(*args):
|
def run_build(opts, *args):
|
||||||
cmd = [config['build-cmd']]
|
cmd = [config['build-cmd']]
|
||||||
cmd += args
|
cmd += args
|
||||||
|
|
||||||
@ -548,6 +548,8 @@ def run_build(*args):
|
|||||||
cmd = sucmd + ['-s', cmd[0], 'root', '--'] + cmd[1:]
|
cmd = sucmd + ['-s', cmd[0], 'root', '--'] + cmd[1:]
|
||||||
else:
|
else:
|
||||||
cmd = sucmd + cmd
|
cmd = sucmd + cmd
|
||||||
|
if not opts.userootforbuild:
|
||||||
|
cmd.append('--norootforbuild')
|
||||||
return run_external(cmd[0], *cmd[1:])
|
return run_external(cmd[0], *cmd[1:])
|
||||||
|
|
||||||
def main(apiurl, opts, argv):
|
def main(apiurl, opts, argv):
|
||||||
|
@ -6470,7 +6470,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
build_args = ['--root=' + build_root, '--noinit', '--shell']
|
build_args = ['--root=' + build_root, '--noinit', '--shell']
|
||||||
if opts.wipe:
|
if opts.wipe:
|
||||||
build_args.append('--wipe')
|
build_args.append('--wipe')
|
||||||
sys.exit(osc.build.run_build(*build_args))
|
sys.exit(osc.build.run_build(opts, *build_args))
|
||||||
elif subcmd in ('shell', 'chroot') or opts.shell:
|
elif subcmd in ('shell', 'chroot') or opts.shell:
|
||||||
print('--shell in combination with build-type %s is experimental.' % vm_chroot)
|
print('--shell in combination with build-type %s is experimental.' % vm_chroot)
|
||||||
print('The semantics may change at any time!')
|
print('The semantics may change at any time!')
|
||||||
|
Loading…
Reference in New Issue
Block a user