mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-25 22:36:13 +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'
|
pac = '_repository'
|
||||||
else:
|
else:
|
||||||
pac = store_read_package(os.curdir)
|
pac = store_read_package(os.curdir)
|
||||||
|
if opts.shell:
|
||||||
|
buildargs.append("--shell")
|
||||||
|
|
||||||
# make it possible to override configuration of the rc file
|
# make it possible to override configuration of the rc file
|
||||||
for var in ['OSC_PACKAGECACHEDIR', 'OSC_SU_WRAPPER', 'OSC_BUILD_ROOT']:
|
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()
|
cmd = (change_personality.get(bi.buildarch, '') + ' ' + cmd).strip()
|
||||||
|
|
||||||
print cmd
|
print cmd
|
||||||
rc = subprocess.call(cmd, shell=True)
|
try:
|
||||||
if rc:
|
rc = subprocess.call(cmd, shell=True)
|
||||||
print
|
if rc:
|
||||||
print 'The buildroot was:', build_root
|
print
|
||||||
sys.exit(rc)
|
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')
|
pacdir = os.path.join(build_root, '.build.packages')
|
||||||
if os.path.islink(pacdir):
|
if os.path.islink(pacdir):
|
||||||
|
@ -4181,6 +4181,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
help=SUPPRESS_HELP)
|
help=SUPPRESS_HELP)
|
||||||
@cmdln.option('--oldpackages', metavar='DIR',
|
@cmdln.option('--oldpackages', metavar='DIR',
|
||||||
help='take previous build from DIR (special values: _self, _link)')
|
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):
|
def do_build(self, subcmd, opts, *args):
|
||||||
"""${cmd_name}: Build a package on your local machine
|
"""${cmd_name}: Build a package on your local machine
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user