1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-27 18:26:15 +01:00

Merge branch 'master' into python3_build_module

This commit is contained in:
Marco Strigl 2019-04-07 11:09:15 -05:00 committed by GitHub
commit 030cd69771
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 19 deletions

View File

@ -6291,14 +6291,16 @@ Please submit there instead, or use --nodevelproject to force direct submission.
args = self.parse_repoarchdescr(args, opts.noinit or opts.offline, opts.alternative_project, False, opts.vm_type, opts.multibuild_package)
# check for source services
r = None
try:
if not opts.offline and not opts.noservice:
p = Package('.')
r = p.run_source_services(verbose=True)
except:
print("WARNING: package is not existing on server yet")
opts.local_package = True
if not opts.offline and not opts.noservice:
p = Package('.')
r = p.run_source_services(verbose=True)
if r:
print('Source service run failed!', file=sys.stderr)
sys.exit(1)
else:
msg = ('WARNING: source services from package or project will not'
'be executed. This may not be the same build as on server!')
print(msg)
if not opts.local_package:
try:
@ -6311,15 +6313,6 @@ Please submit there instead, or use --nodevelproject to force direct submission.
except oscerr.NoWorkingCopy:
pass
if opts.offline or opts.local_package or r == None:
print("WARNING: source service from package or project will not be executed. This may not be the same build as on server!")
elif (conf.config['local_service_run'] and not opts.noservice) and not opts.noinit:
if r != 0:
print('Source service run failed!', file=sys.stderr)
sys.exit(1)
# that is currently unreadable on cli, we should not have a backtrace on standard errors:
#raise oscerr.ServiceRuntimeError('Service run failed: \'%s\'', r)
if conf.config['no_verify']:
opts.no_verify = True

View File

@ -6105,8 +6105,12 @@ def get_buildinfo(apiurl, prj, package, repository, arch, specfile=None, addlist
return f.read()
def get_buildconfig(apiurl, prj, repository):
u = makeurl(apiurl, ['build', prj, repository, '_buildconfig'])
def get_buildconfig(apiurl, prj, repository, path=None):
query = []
if path:
for prp in path:
query.append('path=%s' % quote_plus(prp))
u = makeurl(apiurl, ['build', prj, repository, '_buildconfig'], query=query)
f = http_GET(u)
return f.read()