mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-08 20:15:47 +01:00
- block creating submit requests when a source service is still running (OBS 2.3 only)
This commit is contained in:
parent
acbbbacabd
commit
3e4424d222
@ -893,6 +893,14 @@ class Osc(cmdln.Cmdln):
|
|||||||
print " Skipping package ", p
|
print " Skipping package ", p
|
||||||
else:
|
else:
|
||||||
print "Skipping package ", p, " since it is a source link pointing inside the project."
|
print "Skipping package ", p, " since it is a source link pointing inside the project."
|
||||||
|
serviceinfo = root.find('serviceinfo')
|
||||||
|
if serviceinfo != None:
|
||||||
|
if serviceinfo.get('code') != "succeeded":
|
||||||
|
print "Package ", p, " has a ", serviceinfo.get('code'), " source service"
|
||||||
|
sys.exit("Please fix this first")
|
||||||
|
if serviceinfo.get('error'):
|
||||||
|
print "Package ", p, " contains a failed source service."
|
||||||
|
sys.exit("Please fix this first")
|
||||||
|
|
||||||
# was this project created by clone request ?
|
# was this project created by clone request ?
|
||||||
u = makeurl(apiurl, ['source', project, '_attribute', 'OBS:RequestCloned'])
|
u = makeurl(apiurl, ['source', project, '_attribute', 'OBS:RequestCloned'])
|
||||||
@ -993,6 +1001,19 @@ class Osc(cmdln.Cmdln):
|
|||||||
raise oscerr.WrongArgs('Incorrect number of arguments.\n\n' \
|
raise oscerr.WrongArgs('Incorrect number of arguments.\n\n' \
|
||||||
+ self.get_cmd_help('request'))
|
+ self.get_cmd_help('request'))
|
||||||
|
|
||||||
|
# check for running source service
|
||||||
|
u = makeurl(apiurl, ['source', src_project, src_package])
|
||||||
|
f = http_GET(u)
|
||||||
|
root = ET.parse(f).getroot()
|
||||||
|
serviceinfo = root.find('serviceinfo')
|
||||||
|
if serviceinfo != None:
|
||||||
|
if serviceinfo.get('code') != "succeeded":
|
||||||
|
print "Package ", src_package, " has a ", serviceinfo.get('code'), " source service"
|
||||||
|
sys.exit("Please fix this first")
|
||||||
|
if serviceinfo.get('error'):
|
||||||
|
print "Package ", src_package, " contains a failed source service."
|
||||||
|
sys.exit("Please fix this first")
|
||||||
|
|
||||||
if not opts.nodevelproject:
|
if not opts.nodevelproject:
|
||||||
devloc = None
|
devloc = None
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user