1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-11 16:36:14 +01:00

- allow to set bugowner/maintainership for a given binary

This commit is contained in:
Adrian Schröter 2013-05-02 10:50:05 +02:00
parent cdc1245960
commit a8f14bed60
3 changed files with 16 additions and 1 deletions

2
NEWS
View File

@ -1,6 +1,8 @@
0.140
- allow specifying directories as mv targets
- drop the support for deprecated cbinstall and cbpreinstall directives
- allow to set maintainer or bugowner ship for a binary package initially, but ask back if
this is the right place.
0.139
- various bugfixes for owner search

View File

@ -6872,6 +6872,19 @@ Please submit there instead, or use --nodevelproject to force direct submission.
filterroles=None
if binary:
searchresult = owner(apiurl, binary, "binary", usefilter=filterroles, devel=None, limit=limit)
if not searchresult and (opts.set_bugowner or opts.set_bugowner_request):
# filtered search did not succeed, but maybe we want to set an owner initially?
searchresult = owner(apiurl, binary, "binary", usefilter="", devel=None, limit=-1)
if searchresult:
print("WARNING: the binary exists, but has no matching maintainership roles defined.")
print("Do you want to set it in the container where the binary appeared first?")
result = searchresult.find('owner')
print("This is: " + result.get('project'), end=' ')
if result.get('package'):
print (" / " + result.get('package'))
repl = raw_input('\nUse this this container? (y/n) ')
if repl.lower() != 'y':
searchresult = None
elif opts.user:
searchresult = owner(apiurl, opts.user, "user", usefilter=filterroles, devel=None)
elif opts.group:

View File

@ -5803,7 +5803,7 @@ def owner(apiurl, binary, mode="binary", attribute=None, project=None, usefilter
query['devel'] = devel
if limit != None:
query['limit'] = limit
if usefilter:
if usefilter != None:
query['filter'] = ",".join(usefilter)
u = makeurl(apiurl, [ 'search', 'owner' ], query)
res = None