1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-09-06 05:08:42 +02:00

osc build --shell

This commit is contained in:
Ludwig Nussel
2010-06-24 10:51:55 +02:00
parent 72842a43c3
commit 820595bb20
2 changed files with 14 additions and 5 deletions

View File

@@ -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):