Hello community,

here is the log from the commit of package osc for openSUSE:Factory checked in 
at 2020-11-11 20:46:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/osc (Old)
 and      /work/SRC/openSUSE:Factory/.osc.new.26437 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "osc"

Wed Nov 11 20:46:27 2020 rev:152 rq:847545 version:0.171.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/osc/osc.changes  2020-07-27 17:45:03.251261984 
+0200
+++ /work/SRC/openSUSE:Factory/.osc.new.26437/osc.changes       2020-11-11 
20:46:32.295655205 +0100
@@ -1,0 +2,12 @@
+Tue Nov 10 13:42:55 UTC 2020 - Marco Strigl <marco.str...@suse.com>
+
+- 0.171.1
+  * maintainer search: lookup via package name by default and binary as 
fallback 
+  * fix crash on console resize when downloading files during build 
+  * add proper repourls to osc reporuls 
+  * new command osc releaserequest: This command is used to transfer sources 
and  
+    binaries without rebuilding them. 
+    It requires defined release targets set to trigger="manual". 
+  * some improvements on output of help and error messages 
+
+-------------------------------------------------------------------

Old:
----
  osc-0.170.0.tar.gz

New:
----
  osc-0.171.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ osc.spec ++++++
--- /var/tmp/diff_new_pack.r4iwwu/_old  2020-11-11 20:46:33.423656295 +0100
+++ /var/tmp/diff_new_pack.r4iwwu/_new  2020-11-11 20:46:33.431656302 +0100
@@ -27,12 +27,12 @@
 %define use_python python
 %endif
 
-%define version_unconverted 0.170.0
+%define version_unconverted 0.171.0
 %define osc_plugin_dir %{_prefix}/lib/osc-plugins
 %define macros_file macros.osc
 
 Name:           osc
-Version:        0.170.0
+Version:        0.171.0
 Release:        0
 Summary:        Open Build Service Commander
 License:        GPL-2.0-or-later

++++++ PKGBUILD ++++++
--- /var/tmp/diff_new_pack.r4iwwu/_old  2020-11-11 20:46:33.483656351 +0100
+++ /var/tmp/diff_new_pack.r4iwwu/_new  2020-11-11 20:46:33.487656355 +0100
@@ -1,5 +1,5 @@
 pkgname=osc
-pkgver=0.170.0
+pkgver=0.171.0
 pkgrel=0
 pkgdesc="Open Build Service client"
 arch=('x86_64')

++++++ _service ++++++
--- /var/tmp/diff_new_pack.r4iwwu/_old  2020-11-11 20:46:33.519656385 +0100
+++ /var/tmp/diff_new_pack.r4iwwu/_new  2020-11-11 20:46:33.519656385 +0100
@@ -1,7 +1,7 @@
 <services>
   <service name="tar_scm" mode="disabled">
-    <param name="version">0.170.0</param>
-    <param name="revision">0.170.0</param>
+    <param name="version">0.171.0</param>
+    <param name="revision">0.171.0</param>
     <param name="url">git://github.com/openSUSE/osc.git</param>
     <param name="scm">git</param>
   </service>

++++++ debian.changelog ++++++
--- /var/tmp/diff_new_pack.r4iwwu/_old  2020-11-11 20:46:33.587656449 +0100
+++ /var/tmp/diff_new_pack.r4iwwu/_new  2020-11-11 20:46:33.595656456 +0100
@@ -1,4 +1,4 @@
-osc (0.170.0) unstable; urgency=low
+osc (0.171.0) unstable; urgency=low
   - Package for Python3
 
  -- Nick Brown <nick.br...@att.com>  Wed, 30 Jan 2020 14:49:30 +0000

++++++ osc-0.170.0.tar.gz -> osc-0.171.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-0.170.0/NEWS new/osc-0.171.0/NEWS
--- old/osc-0.170.0/NEWS        2020-07-09 09:57:53.000000000 +0200
+++ new/osc-0.171.0/NEWS        2020-11-10 14:25:02.000000000 +0100
@@ -1,3 +1,12 @@
+0.171.0
+  - maintainer search: lookup via package name by default and binary as 
fallback
+  - fix crash on console resize when downloading files during build
+  - add proper repourls to osc reporuls
+  - new command osc releaserequest: This command is used to transfer sources 
and
+    binaries without rebuilding them.
+    It requires defined release targets set to trigger="manual".
+  - some improvements on output of help and error messages
+
 0.170
   - fix code for python3.8 and python3.9
   - remove dead code
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-0.170.0/README new/osc-0.171.0/README
--- old/osc-0.170.0/README      2020-07-09 09:57:53.000000000 +0200
+++ new/osc-0.171.0/README      2020-11-10 14:25:02.000000000 +0100
@@ -3,7 +3,7 @@
 
 Patches can be submitted via
  * mail to opensuse-buildserv...@opensuse.org
- * Bugzilla: 
https://bugzilla.novell.com/enter_bug.cgi?product=openSUSE.org&component=BuildService
+ * Bugzilla: 
https://bugzilla.opensuse.org/enter_bug.cgi?product=openSUSE.org&component=BuildService
  * or the official Git repository on Github:
    https://github.com/openSUSE/osc
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-0.170.0/osc/babysitter.py 
new/osc-0.171.0/osc/babysitter.py
--- old/osc-0.170.0/osc/babysitter.py   2020-07-09 09:57:53.000000000 +0200
+++ new/osc-0.171.0/osc/babysitter.py   2020-11-10 14:25:02.000000000 +0100
@@ -49,11 +49,16 @@
 def catchterm(*args):
     raise oscerr.SignalInterrupt
 
+
+# Signals which should terminate the program safely
 for name in 'SIGBREAK', 'SIGHUP', 'SIGTERM':
     num = getattr(signal, name, None)
     if num:
         signal.signal(num, catchterm)
 
+# Signals which should be ignored
+for sig in (signal.SIGWINCH,):
+    signal.signal(sig, signal.SIG_IGN)
 
 def run(prg, argv=None):
     try:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-0.170.0/osc/build.py new/osc-0.171.0/osc/build.py
--- old/osc-0.170.0/osc/build.py        2020-07-09 09:57:53.000000000 +0200
+++ new/osc-0.171.0/osc/build.py        2020-11-10 14:25:02.000000000 +0100
@@ -275,9 +275,10 @@
         return "%s" % self.name
 
 
-def get_preinstall_image(apiurl, arch, cache_dir, img_info):
+def get_preinstall_image(apiurl, arch, cache_dir, img_info, offline=False):
     """
-    Searches preinstall image according to build info and downloads it to 
cache.
+    Searches preinstall image according to build info and downloads it to cache
+    (unless offline is set to True (default: False)).
     Returns preinstall image path, source and list of image binaries, which can
     be used to create rpmlist.
     NOTE: preinstall image can be used only for new build roots!
@@ -304,6 +305,8 @@
     imagesource = "%s/%s/%s [%s]" % (img_project, img_repository, img_pkg, 
img_hdrmd5)
 
     if not os.path.exists(ifile_path):
+        if offline:
+            return '', '', []
         url = "%s/build/%s/%s/%s/%s/%s" % (apiurl, img_project, 
img_repository, img_arch, img_pkg, img_file)
         print("downloading preinstall image %s" % imagesource)
         if not os.path.exists(cache_path):
@@ -504,7 +507,7 @@
                 print("adding '%s' to oscrc: ['%s']['trusted_prj']" % (prj, 
apiurl))
                 trusted.append(prj)
             elif r != '2':
-                print("Well, good good bye then :-)")
+                print("Well, goodbye then :-)")
                 raise oscerr.UserAbort()
 
     if tlen != len(trusted):
@@ -987,10 +990,11 @@
     imagebins = []
     if (not config['no_preinstallimage'] and not opts.nopreinstallimage and
         bi.preinstallimage and
-        not opts.noinit and not opts.offline and
+        not opts.noinit and
         (opts.clean or (not os.path.exists(build_root + "/installed-pkg") and
                         not os.path.exists(build_root + 
"/.build/init_buildsystem.data")))):
-        (imagefile, imagesource, imagebins) = get_preinstall_image(apiurl, 
arch, cache_dir, bi.preinstallimage)
+        (imagefile, imagesource, imagebins) = get_preinstall_image(apiurl, 
arch, cache_dir, bi.preinstallimage,
+                                                                   
opts.offline)
         if imagefile:
             # remove binaries from build deps which are included in preinstall 
image
             for i in bi.deps:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-0.170.0/osc/commandline.py 
new/osc-0.171.0/osc/commandline.py
--- old/osc-0.170.0/osc/commandline.py  2020-07-09 09:57:53.000000000 +0200
+++ new/osc-0.171.0/osc/commandline.py  2020-11-10 14:25:02.000000000 +0100
@@ -9,7 +9,6 @@
 from . import conf
 from . import oscerr
 import sys
-import signal
 import time
 import imp
 import inspect
@@ -1276,7 +1275,7 @@
                         t = linkinfo.get('project')
                         if t is None:
                             print("Skipping package ", p,  " since it is a 
source link pointing inside the project.")
-                            continue 
+                            continue
                     print("Submitting package ", p)
                     try:
                         result = create_submit_request(apiurl, project, p, 
target_project, src_update=src_update)
@@ -3107,18 +3106,30 @@
 
 
     @cmdln.option('-m', '--message', metavar='TEXT',
-                        help='specify message TEXT')
+                  help='specify message TEXT')
+    @cmdln.option('-p', '--package', metavar='PKG', action='append',
+                  help='specify packages to release')
     def do_releaserequest(self, subcmd, opts, *args):
-        """${cmd_name}: Create a request for releasing a maintenance update.
+        """${cmd_name}: Create a release request
 
-        [See 
http://openbuildservice.org/help/manuals/obs-reference-guide/cha.obs.maintenance_setup.html
-         for information on this topic.]
+        For maintenance incident projects:
 
         This command is used by the maintenance team to start the release 
process of a maintenance update.
         This includes usually testing based on the defined reviewers of the 
update project.
 
+        [See 
https://openbuildservice.org/help/manuals/obs-user-guide/cha.obs.maintenance_setup.html
+         for information on this topic.]
+
+        For normal projects:
+
+        This command is used to transfer sources and binaries without 
rebuilding them.
+        It requires defined release targets set to trigger="manual".
+
+        [See 
https://openbuildservice.org/help/manuals/obs-user-guide/cha.obs.request_and_review_system.html
+         for information on this topic.]
+
         usage:
-            osc releaserequest [ SOURCEPROJECT ]
+            osc releaserequest [-p package] [ SOURCEPROJECT ]
 
         ${cmd_option_list}
         """
@@ -3140,12 +3151,25 @@
         if len(args) > 0:
             source_project = args[0]
 
+        f = show_project_meta(apiurl, source_project)
+        root = ET.fromstring(b''.join(f))
+
         if not opts.message:
             opts.message = edit_message()
         else:
             opts.message = str(opts.message.encode().decode('unicode_escape'))
 
-        r = create_release_request(apiurl, source_project, opts.message)
+        if 'kind' in root.attrib and root.attrib['kind'] == 
'maintenance_incident':
+            r = create_release_request(apiurl, source_project, opts.message)
+        else:
+            r = Request()
+            if opts.package:
+                for pac in opts.package:
+                    r.add_action('release', src_project=source_project, 
src_package=pac)
+            else:
+                r.add_action('release', src_project=source_project)
+            r.description = _html_escape(opts.message)
+            r.create(apiurl)
         print(r.reqid)
 
 
@@ -3961,7 +3985,8 @@
     @cmdln.option('-r', '--revision', metavar='N[:M]',
                   help='revision id, where N = old revision and M = new 
revision')
     @cmdln.option('-p', '--plain', action='store_true',
-                  help='output the diff in plain (not unified) diff format')
+                  help='output the diff in plain (not unified) diff format'
+                       ' and show diff of files in archives')
     @cmdln.option('-c', '--change', metavar='rev',
                         help='the change made by revision rev (like -r 
rev-1:rev). '
                              'If rev is negative this is like -r rev:rev-1.')
@@ -3979,11 +4004,6 @@
 
         If no revision is specified the latest revision is used.
 
-        Note that this command doesn't return a normal diff (which could be
-        applied as patch), but a "pretty" diff, which also compares the content
-        of tarballs.
-
-
         usage:
             osc ${cmd_name} OLDPRJ OLDPAC NEWPRJ [NEWPAC]
             osc ${cmd_name} PROJECT PACKAGE
@@ -4364,14 +4384,27 @@
     def do_repourls(self, subcmd, opts, *args):
         """${cmd_name}: Shows URLs of .repo files
 
-        Shows URLs on which to access the project .repos files (yum-style
-        metadata) on download.opensuse.org.
+        Shows URLs on which to access the project repositories.
 
         usage:
            osc repourls [PROJECT]
 
         ${cmd_option_list}
         """
+        import tempfile
+
+        def _repo_type(apiurl, project,repo):
+            if not os.path.exists('/usr/lib/build/queryconfig'):
+                return None
+            build_config = get_buildconfig(apiurl, project, repo)
+            with tempfile.NamedTemporaryFile() as f:
+                f.write(build_config)
+                f.flush()
+                repo_type = return_external('/usr/lib/build/queryconfig', 
'--dist',
+                                        f.name, 'repotype').rstrip(b'\n')
+            if not repo_type:
+                return None
+            return decode_it(repo_type)
 
         apiurl = self.get_api_url()
 
@@ -4387,10 +4420,19 @@
         if elm is None or not elm.text:
             raise oscerr.APIError('download_url configuration element 
expected')
 
+        url_deb_tmpl = 'deb ' + elm.text + '/%s/%s/ /'
+        url_arch_tmpl = 'Server=' + elm.text + '/%s/%s/$arch'
         url_tmpl = elm.text + '/%s/%s/%s.repo'
         repos = get_repositories_of_project(apiurl, project)
         for repo in repos:
-            print(url_tmpl % (project.replace(':', ':/'), repo, project))
+            repo_type = _repo_type(apiurl, project, repo)
+            if repo_type == 'debian':
+                print(url_deb_tmpl % (project.replace(':', ':/'), repo))
+            elif repo_type == 'arch':
+                print(url_arch_tmpl % (project.replace(':', ':/'), repo))
+            else:
+                # We assume everything else is rpm-md
+                print(url_tmpl % (project.replace(':', ':/'), repo, project))
 
 
     def do_browse(self, subcmd, opts, *args):
@@ -4708,7 +4750,7 @@
 
         # Do some magic here, when adding a url. We want that the server to 
download the tar ball and to verify it
         for arg in parseargs(args):
-            if arg.endswith('.git') or arg.startswith('git://') or 
arg.startswith('git@'):
+            if arg.endswith('.git') or arg.startswith('git://') or 
arg.startswith('git@') or arg.startswith('https://github.com') or 
arg.startswith('https://gitlab.com'):
                 addGitSource(arg)
             elif arg.startswith('http://') or arg.startswith('https://') or 
arg.startswith('ftp://'):
                 addDownloadUrlService(arg)
@@ -6054,9 +6096,11 @@
         """${cmd_name}: gets the information to a worker from the server
 
         Examples:
-            osc workerinfo <workername>
+            osc workerinfo x86_64:goat:1
+
+        Usage:
+            osc workerinfo <hostarch>:<workerid>
 
-        ${cmd_usage}
         ${cmd_option_list}
         """
         apiurl = self.get_api_url()
@@ -6938,24 +6982,28 @@
             osc service COMMAND (inside working copy)
             osc service run [SOURCE_SERVICE]
             osc service runall
-            osc service localrun
-            osc service disabledrun
+            osc service manualrun [SOURCE_SERVICE]
+            osc service localrun [SOURCE_SERVICE]
+            osc service disabledrun [SOURCE_SERVICE]
             osc service remoterun [PROJECT PACKAGE]
             osc service merge [PROJECT PACKAGE]
             osc service wait [PROJECT PACKAGE]
 
             COMMAND can be:
-            run         r  run defined services locally, it takes an optional 
parameter to run only a
+            run         r  run defined services with modes "trylocal", 
"localonly", or no mode set locally, may take an optional parameter to run only 
a
                            specified source service. In case parameters exist 
for this one in _service file
                            they are used.
             runall      ra run all services independent of the used mode
-            localrun    lr run all services except the ones with mode 
"buildtime", "disabled", or
-                           "serveronly" (deprecated)
-            disabledrun dr run all services with mode "disabled" or 
"serveronly" (deprecated)
+            manualrun   mr run all services with mode "manual", may take an 
optional parameter to run only a
+                           specified source service
             remoterun   rr trigger a re-run on the server side
             merge          commits all server side generated files and drops 
the _service definition
             wait           waits until the service finishes and returns with 
an error if it failed
 
+            Not for common usage anymore:
+            localrun    lr the same as "run" but services with mode 
"serveronly" are also executed
+            disabledrun dr run all services with mode "disabled"
+
         ${cmd_option_list}
         """
         # disabledrun and localrun exists as well, but are considered to be 
obsolete
@@ -6988,7 +7036,7 @@
 
         command = args[0]
 
-        if not (command in ( 'runall', 'ra', 'run', 'localrun', 'disabledrun', 
'remoterun', 'lr', 'dr', 'r', 'rr', 'merge', 'wait' )):
+        if not (command in ( 'runall', 'ra', 'run', 'localrun', 'manualrun', 
'disabledrun', 'remoterun', 'lr', 'dr', 'mr', 'rr', 'merge', 'wait' )):
             raise oscerr.WrongArgs('Wrong command given.')
 
         if command == "remoterun" or command == "rr":
@@ -7003,12 +7051,14 @@
             print(mergeservice(apiurl, project, package))
             return
 
-        if command in ('runall', 'ra', 'run', 'localrun', 'disabledrun', 'lr', 
'dr', 'r'):
+        if command in ('runall', 'ra', 'run', 'localrun', 'manualrun', 
'disabledrun', 'lr', 'mr', 'dr', 'r'):
             if not is_package_dir(os.curdir):
                 raise oscerr.WrongArgs('Local directory is no package')
             p = Package(".")
             if command == "localrun" or command == "lr":
                 mode = "local"
+            elif command == "manualrun" or command == "mr":
+                mode = "manual"
             elif command == "disabledrun" or command == "dr":
                 mode = "disabled"
             elif command == "runall" or command == "ra":
@@ -8152,7 +8202,7 @@
         """${cmd_name}: Show maintainers according to server side configuration
 
             # Search for official maintained sources in OBS instance
-            osc maintainer BINARY <options>
+            osc maintainer BINARY_OR_PACKAGE_NAME <options>
             osc maintainer -U <user> <options>
             osc maintainer -G <group> <options>
 
@@ -8200,7 +8250,7 @@
                     opts.set_bugowner_request = bugowner
                     opts.set_bugowner = None
 
-        binary = None
+        search_term = None
         prj = None
         pac = None
         metaroot = None
@@ -8222,8 +8272,8 @@
                 pass
             prj = store_read_project('.')
         elif len(args) == 1:
-            # it is unclear if one argument is a binary or a project, try 
binary first for new OBS 2.4
-            binary = prj = args[0]
+            # it is unclear if one argument is a search_term or a project, try 
search_term first for new OBS 2.4
+            search_term = prj = args[0]
         elif len(args) == 2:
             prj = args[0]
             pac = args[1]
@@ -8233,7 +8283,7 @@
         apiurl = self.get_api_url()
 
         # Try the OBS 2.4 way first.
-        if binary or opts.user or opts.group:
+        if search_term or opts.user or opts.group:
             limit = None
             if opts.all:
                 limit = 0
@@ -8241,13 +8291,17 @@
             if filterroles == [ 'bugowner', 'maintainer' ]:
                 # use server side configured default
                 filterroles = None
-            if binary:
-                searchresult = owner(apiurl, binary, "binary", 
usefilter=filterroles, devel=None, limit=limit)
+            if search_term:
+                # try the package name first, it is faster and may catch cases 
where no
+                # binary with that name exists for the given package name
+                searchresult = owner(apiurl, search_term, "package", 
usefilter=filterroles, devel=None, limit=limit)
+                if searchresult == None or len(searchresult) == 0:
+                    searchresult = owner(apiurl, search_term, "binary", 
usefilter=filterroles, devel=None, limit=limit)
                 if searchresult != None and len(searchresult) == 0:
                     # We talk to an OBS 2.4 or later understanding the call
                     if 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)
+                        searchresult = owner(apiurl, search_term, "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?")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-0.170.0/osc/core.py new/osc-0.171.0/osc/core.py
--- old/osc-0.170.0/osc/core.py 2020-07-09 09:57:53.000000000 +0200
+++ new/osc-0.171.0/osc/core.py 2020-11-10 14:25:02.000000000 +0100
@@ -5,7 +5,7 @@
 
 from __future__ import print_function
 
-__version__ = '0.170.0'
+__version__ = '0.171.0'
 
 # __store_version__ is to be incremented when the format of the working copy
 # "store" changes in an incompatible way. Please add any needed migration
@@ -422,10 +422,13 @@
                     os.unlink(ent)
 
         allservices = self.services or []
-        if singleservice and not singleservice in allservices:
+        service_names = [s['name'] for s in allservices]
+        if singleservice and singleservice not in service_names:
             # set array to the manual specified singleservice, if it is not 
part of _service file
-            data = { 'name' : singleservice, 'command' : [ singleservice ], 
'mode' : '' }
+            data = { 'name' : singleservice, 'command' : [ singleservice ], 
'mode' : callmode }
             allservices = [data]
+        elif singleservice:
+            allservices = [s for s in allservices if s['name'] == 
singleservice]
 
         if not allservices:
             # short-circuit to avoid a potential http request in vc_export_env
@@ -449,11 +452,13 @@
         ret = 0
         for service in allservices:
             if callmode != "all":
-                if singleservice and service['name'] != singleservice:
-                    continue
                 if service['mode'] == "buildtime":
                     continue
-                if service['mode'] == "serveronly" and callmode != "disabled":
+                if service['mode'] == "serveronly" and callmode != "local":
+                    continue
+                if service['mode'] == "manual" and callmode != "manual":
+                    continue
+                if service['mode'] != "manual" and callmode == "manual":
                     continue
                 if service['mode'] == "disabled" and callmode != "disabled":
                     continue
@@ -479,7 +484,7 @@
                     #        updating _services.
                     return r
 
-                if service['mode'] == "disabled" or service['mode'] == 
"trylocal" or service['mode'] == "localonly" or callmode == "local" or callmode 
== "trylocal" or callmode == "all":
+                if service['mode'] == "manual" or service['mode'] == 
"disabled" or service['mode'] == "trylocal" or service['mode'] == "localonly" 
or callmode == "local" or callmode == "trylocal" or callmode == "all":
                     for filename in os.listdir(temp_dir):
                         os.rename(os.path.join(temp_dir, filename), 
os.path.join(dir, filename))
                 else:
@@ -2671,6 +2676,9 @@
         'maintenance_release': ('src_project', 'src_package', 'src_rev', 
'tgt_project', 'tgt_package', 'person_name',
                             'acceptinfo_rev', 'acceptinfo_srcmd5', 
'acceptinfo_xsrcmd5', 'acceptinfo_osrcmd5',
                             'acceptinfo_oxsrcmd5', 'acceptinfo_oproject', 
'acceptinfo_opackage'),
+        'release': ('src_project', 'src_package', 'src_rev', 'tgt_project', 
'tgt_package', 'person_name',
+                            'acceptinfo_rev', 'acceptinfo_srcmd5', 
'acceptinfo_xsrcmd5', 'acceptinfo_osrcmd5',
+                            'acceptinfo_oxsrcmd5', 'acceptinfo_oproject', 
'acceptinfo_opackage', 'tgt_repository'),
         'maintenance_incident': ('src_project', 'src_package', 'src_rev', 
'tgt_project', 'tgt_package', 'tgt_releaseproject', 'person_name', 
'opt_sourceupdate', 'opt_makeoriginolder',
                             'acceptinfo_rev', 'acceptinfo_srcmd5', 
'acceptinfo_xsrcmd5', 'acceptinfo_osrcmd5',
                             'acceptinfo_oxsrcmd5'),
@@ -2930,7 +2938,7 @@
             srcupdate = ' '
             if action.opt_sourceupdate and show_srcupdate:
                 srcupdate = '(%s)' % action.opt_sourceupdate
-        elif action.type == 'maintenance_release':
+        elif action.type in ('maintenance_release', 'release'):
             d['source'] = '%s' % prj_pkg_join(action.src_project, 
action.src_package)
             if action.src_rev:
                 d['source'] = d['source'] + '@%s' % action.src_rev
@@ -6681,7 +6689,7 @@
     if not apiurl:
         apiurl = conf.config['apiurl']
     try:
-        if int(revision) > int(show_upstream_rev(apiurl, prj, pac, meta)) \
+        if int(revision) > int(show_upstream_rev(apiurl, prj, pac, meta=meta)) 
\
            or int(revision) <= 0:
             return False
         else:
@@ -6801,12 +6809,21 @@
         res[urlpath] = ET.parse(f).getroot()
     return res
 
-def owner(apiurl, binary, mode="binary", attribute=None, project=None, 
usefilter=None, devel=None, limit=None):
+def owner(apiurl, search_term=None, mode="binary", attribute=None,
+          project=None, usefilter=None, devel=None, limit=None, binary=None):
     """
     Perform a binary package owner search. This is supported since OBS 2.4.
     """
+
+    # binary is just for API backward compatibility
+    if not ((search_term is None) ^ (binary is None)):
+        raise ValueError('Either specify search_term or binary')
+    elif binary is not None:
+        search_term = binary
+ 
     # find default project, if not specified
-    query = { mode: binary }
+    # mode can be "binary" or "package" atm
+    query = { mode: search_term }
     if attribute:
         query['attribute'] = attribute
     if project:
@@ -7385,6 +7402,13 @@
             return True
         except HTTPError as e:
             print('Server returned an error:', e, file=sys.stderr)
+            details = e.hdrs.get('X-Opensuse-Errorcode')
+            if details:
+                print(details, file=sys.stderr)
+            root = ET.fromstring(e.read())
+            summary = root.find('summary')
+            if summary is not None:
+                print(summary.text, file=sys.stderr)
             print('Try -f to force the state change', file=sys.stderr)
         return False
 

++++++ osc.dsc ++++++
--- /var/tmp/diff_new_pack.r4iwwu/_old  2020-11-11 20:46:34.171656997 +0100
+++ /var/tmp/diff_new_pack.r4iwwu/_new  2020-11-11 20:46:34.171656997 +0100
@@ -1,6 +1,6 @@
 Format: 1.0
 Source: osc
-Version: 0.170.0
+Version: 0.171.0
 Binary: osc
 Maintainer: Adrian Schroeter <adr...@suse.de>
 Architecture: any
_______________________________________________
openSUSE Commits mailing list -- commit@lists.opensuse.org
To unsubscribe, email commit-le...@lists.opensuse.org
List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette
List Archives: 
https://lists.opensuse.org/archives/list/commit@lists.opensuse.org

Reply via email to