mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-11 16:36:14 +01:00
osc build --shell
This commit is contained in:
parent
72842a43c3
commit
820595bb20
17
osc/build.py
17
osc/build.py
@ -440,6 +440,8 @@ def main(apiurl, opts, argv):
|
||||
pac = '_repository'
|
||||
else:
|
||||
pac = store_read_package(os.curdir)
|
||||
if opts.shell:
|
||||
buildargs.append("--shell")
|
||||
|
||||
# make it possible to override configuration of the rc file
|
||||
for var in ['OSC_PACKAGECACHEDIR', 'OSC_SU_WRAPPER', 'OSC_BUILD_ROOT']:
|
||||
@ -851,11 +853,16 @@ def main(apiurl, opts, argv):
|
||||
cmd = (change_personality.get(bi.buildarch, '') + ' ' + cmd).strip()
|
||||
|
||||
print cmd
|
||||
rc = subprocess.call(cmd, shell=True)
|
||||
if rc:
|
||||
print
|
||||
print 'The buildroot was:', build_root
|
||||
sys.exit(rc)
|
||||
try:
|
||||
rc = subprocess.call(cmd, shell=True)
|
||||
if rc:
|
||||
print
|
||||
print 'The buildroot was:', build_root
|
||||
sys.exit(rc)
|
||||
except KeyboardInterrupt, i:
|
||||
print "keyboard interrupt, killing build ..."
|
||||
subprocess.call(cmd + " --kill", shell=True)
|
||||
raise i
|
||||
|
||||
pacdir = os.path.join(build_root, '.build.packages')
|
||||
if os.path.islink(pacdir):
|
||||
|
@ -4181,6 +4181,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
help=SUPPRESS_HELP)
|
||||
@cmdln.option('--oldpackages', metavar='DIR',
|
||||
help='take previous build from DIR (special values: _self, _link)')
|
||||
@cmdln.option('--shell', action='store_true',
|
||||
help=SUPPRESS_HELP)
|
||||
def do_build(self, subcmd, opts, *args):
|
||||
"""${cmd_name}: Build a package on your local machine
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user