1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-25 01:16:14 +01:00

- added "local_service_run" config option

can be used to permanently disable the local service run on commit
(default: enabled)
This commit is contained in:
Marcus Huewe 2011-09-07 15:19:54 +02:00
parent 568612cedc
commit 3683d9550d
2 changed files with 10 additions and 6 deletions

View File

@ -3718,7 +3718,9 @@ Please submit there instead, or use --nodevelproject to force direct submission.
msg = open(opts.file).read() msg = open(opts.file).read()
except: except:
sys.exit('could not open file \'%s\'.' % opts.file) sys.exit('could not open file \'%s\'.' % opts.file)
skip_local_service_run = False
if not conf.config['local_service_run'] or opts.skip_local_service_run:
skip_local_service_run = True
arg_list = args[:] arg_list = args[:]
for arg in arg_list: for arg in arg_list:
if conf.config['do_package_tracking'] and is_project_dir(arg): if conf.config['do_package_tracking'] and is_project_dir(arg):
@ -3726,7 +3728,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
prj = Project(arg) prj = Project(arg)
if not msg: if not msg:
msg = edit_message() msg = edit_message()
prj.commit(msg=msg, skip_local_service_run=opts.skip_local_service_run, verbose=opts.verbose) prj.commit(msg=msg, skip_local_service_run=skip_local_service_run, verbose=opts.verbose)
except oscerr.ExtRuntimeError, e: except oscerr.ExtRuntimeError, e:
print >>sys.stderr, "ERROR: service run failed", e print >>sys.stderr, "ERROR: service run failed", e
return 1 return 1
@ -3758,13 +3760,13 @@ Please submit there instead, or use --nodevelproject to force direct submission.
prj = Project(prj_path) prj = Project(prj_path)
if not msg: if not msg:
msg = get_commit_msg(prj.absdir, pac_objs[prj_path]) msg = get_commit_msg(prj.absdir, pac_objs[prj_path])
prj.commit(packages, msg=msg, files=files, skip_local_service_run=opts.skip_local_service_run, verbose=opts.verbose) prj.commit(packages, msg=msg, files=files, skip_local_service_run=skip_local_service_run, verbose=opts.verbose)
store_unlink_file(prj.absdir, '_commit_msg') store_unlink_file(prj.absdir, '_commit_msg')
for pac in single_paths: for pac in single_paths:
p = Package(pac) p = Package(pac)
if not msg: if not msg:
msg = get_commit_msg(p.absdir, [p]) msg = get_commit_msg(p.absdir, [p])
p.commit(msg, skip_local_service_run=opts.skip_local_service_run, verbose=opts.verbose) p.commit(msg, skip_local_service_run=skip_local_service_run, verbose=opts.verbose)
store_unlink_file(p.absdir, '_commit_msg') store_unlink_file(p.absdir, '_commit_msg')
else: else:
for p in pacs: for p in pacs:
@ -3774,7 +3776,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
p.todo.sort() p.todo.sort()
if not msg: if not msg:
msg = get_commit_msg(p.absdir, [p]) msg = get_commit_msg(p.absdir, [p])
p.commit(msg, skip_local_service_run=opts.skip_local_service_run, verbose=opts.verbose) p.commit(msg, skip_local_service_run=skip_local_service_run, verbose=opts.verbose)
store_unlink_file(p.absdir, '_commit_msg') store_unlink_file(p.absdir, '_commit_msg')
@cmdln.option('-r', '--revision', metavar='REV', @cmdln.option('-r', '--revision', metavar='REV',

View File

@ -145,6 +145,7 @@ DEFAULTS = {'apiurl': 'https://api.opensuse.org',
'submitrequest_declined_template': '', 'submitrequest_declined_template': '',
'linkcontrol': '0', 'linkcontrol': '0',
'include_request_from_project': '1', 'include_request_from_project': '1',
'local_service_run': '1',
# Maintenance defaults to OBS instance defaults # Maintenance defaults to OBS instance defaults
'maintained_attribute': 'OBS:Maintained', 'maintained_attribute': 'OBS:Maintained',
@ -159,7 +160,8 @@ config = DEFAULTS.copy()
boolean_opts = ['debug', 'do_package_tracking', 'http_debug', 'post_mortem', 'traceback', 'check_filelist', 'plaintext_passwd', boolean_opts = ['debug', 'do_package_tracking', 'http_debug', 'post_mortem', 'traceback', 'check_filelist', 'plaintext_passwd',
'checkout_no_colon', 'checkout_rooted', 'check_for_request_on_action', 'linkcontrol', 'show_download_progress', 'request_show_interactive', 'checkout_no_colon', 'checkout_rooted', 'check_for_request_on_action', 'linkcontrol', 'show_download_progress', 'request_show_interactive',
'use_keyring', 'gnome_keyring', 'no_verify', 'builtin_signature_check', 'http_full_debug', 'include_request_from_project'] 'use_keyring', 'gnome_keyring', 'no_verify', 'builtin_signature_check', 'http_full_debug', 'include_request_from_project',
'local_service_run']
api_host_options = ['user', 'pass', 'passx', 'aliases', 'http_headers', 'email', 'sslcertck', 'cafile', 'capath', 'trusted_prj'] api_host_options = ['user', 'pass', 'passx', 'aliases', 'http_headers', 'email', 'sslcertck', 'cafile', 'capath', 'trusted_prj']