Hello community,

here is the log from the commit of package osc for openSUSE:Factory checked in 
at 2019-07-11 13:16:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/osc (Old)
 and      /work/SRC/openSUSE:Factory/.osc.new.4615 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "osc"

Thu Jul 11 13:16:37 2019 rev:135 rq:714067 version:0.165.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/osc/osc.changes  2019-06-20 19:04:38.281605169 
+0200
+++ /work/SRC/openSUSE:Factory/.osc.new.4615/osc.changes        2019-07-11 
13:16:38.834800398 +0200
@@ -1,0 +2,15 @@
+Mon Jul  8 11:11:58 UTC 2019 - Marco Strigl <[email protected]>
+
+- 0.165.2 (boo#1140697)
+    * support different token operations (runservice, release and rebuild) 
(requires OBS 2.10)
+    * fix osc token decode error
+    * offline build mode is now really offline and does not try to download 
the buildconfig
+    * osc build -define now works with python3
+    * some spelling fixes
+    * properly parse the error message on osc meta -e
+    * osc maintainer -s now works with python3
+    * simplified and fixed osc meta -e (boo#1138977) 
+    * osc lbl now works with non utf8 encoding (boo#1129889)
+    * add simpleimage as local build type 
+
+-------------------------------------------------------------------

Old:
----
  osc-0.165.1.tar.gz

New:
----
  osc-0.165.2.tar.gz

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

Other differences:
------------------
++++++ osc.spec ++++++
--- /var/tmp/diff_new_pack.NNcqZD/_old  2019-07-11 13:16:39.678800132 +0200
+++ /var/tmp/diff_new_pack.NNcqZD/_new  2019-07-11 13:16:39.694800127 +0200
@@ -27,12 +27,12 @@
 %define use_python python
 %endif
 
-%define version_unconverted 0.165.1
+%define version_unconverted 0.165.2
 %define osc_plugin_dir %{_prefix}/lib/osc-plugins
 %define macros_file macros.osc
 
 Name:           osc
-Version:        0.165.1
+Version:        0.165.2
 Release:        0
 Summary:        Open Build Service Commander
 License:        GPL-2.0-or-later

++++++ PKGBUILD ++++++
--- /var/tmp/diff_new_pack.NNcqZD/_old  2019-07-11 13:16:39.766800105 +0200
+++ /var/tmp/diff_new_pack.NNcqZD/_new  2019-07-11 13:16:39.770800103 +0200
@@ -1,5 +1,5 @@
 pkgname=osc
-pkgver=0.165.1
+pkgver=0.165.2
 pkgrel=0
 pkgdesc="Open Build Service client"
 arch=('i686' 'x86_64')

++++++ _service ++++++
--- /var/tmp/diff_new_pack.NNcqZD/_old  2019-07-11 13:16:39.822800087 +0200
+++ /var/tmp/diff_new_pack.NNcqZD/_new  2019-07-11 13:16:39.822800087 +0200
@@ -1,7 +1,7 @@
 <services>
   <service name="tar_scm" mode="disabled">
-    <param name="version">0.165.1</param>
-    <param name="revision">0.165.1</param>
+    <param name="version">0.165.2</param>
+    <param name="revision">0.165.2</param>
     <param name="url">git://github.com/openSUSE/osc.git</param>
     <param name="scm">git</param>
   </service>

++++++ debian.changelog ++++++
--- /var/tmp/diff_new_pack.NNcqZD/_old  2019-07-11 13:16:39.926800054 +0200
+++ /var/tmp/diff_new_pack.NNcqZD/_new  2019-07-11 13:16:39.930800053 +0200
@@ -1,4 +1,4 @@
-osc (0.165.1) unstable; urgency=low
+osc (0.165.2) unstable; urgency=low
   - Update to 0.161.1
 
  -- Marco Strigl <[email protected]>  Thu, 26 Oct 2017 14:42:00 +0200

++++++ osc-0.165.1.tar.gz -> osc-0.165.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-0.165.1/NEWS new/osc-0.165.2/NEWS
--- old/osc-0.165.1/NEWS        2019-05-20 08:35:27.000000000 +0200
+++ new/osc-0.165.2/NEWS        2019-07-08 11:28:50.000000000 +0200
@@ -1,3 +1,15 @@
+0.165.2
+  - support different token operations (runservice, release and rebuild) 
(requires OBS 2.10)
+  - fix osc token decode error
+  - offline build mode is now really offline and does not try to download the 
buildconfig
+  - osc build -define now works with python3
+  - some spelling fixes
+  - properly parse the error message on osc meta -e
+  - osc maintainer -s now works with python3
+  - simplified and fixed osc meta -e 
+  - osc lbl now works with non utf8 encoding
+  - add simpleimage as local build type 
+
 0.165.1
   - fix oscssl "urldefrag is not defined error"
   - osc release command now python3 compatible
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-0.165.1/osc/build.py new/osc-0.165.2/osc/build.py
--- old/osc-0.165.1/osc/build.py        2019-05-20 08:35:27.000000000 +0200
+++ new/osc-0.165.2/osc/build.py        2019-07-08 11:28:50.000000000 +0200
@@ -374,6 +374,11 @@
                                     '-name', '*.AppImage'],
                                    
stdout=subprocess.PIPE).stdout.read().strip()
         s_built = ''
+    elif buildtype == 'simpleimage':
+        b_built = subprocess.Popen(['find', os.path.join(pacdir, 
'SIMPLEIMAGE'),
+                                    '-type', 'f'],
+                                   
stdout=subprocess.PIPE).stdout.read().strip()
+        s_built = ''
     else:
         print('WARNING: Unknown package type \'%s\'.' % buildtype, 
file=sys.stderr)
         b_built = ''
@@ -538,13 +543,15 @@
         build_type = 'appimage'
     if os.path.basename(build_descr) == 'snapcraft.yaml':
         build_type = 'snapcraft'
+    if os.path.basename(build_descr) == 'simpleimage':
+        build_type = 'simpleimage'
     if os.path.basename(build_descr) == 'Dockerfile':
         build_type = 'docker'
     if os.path.basename(build_descr) == 'fissile.yml':
         build_type = 'fissile'
-    if build_type not in ['spec', 'dsc', 'kiwi', 'arch', 'collax', 
'livebuild', 'snapcraft', 'appimage', 'docker', 'podman', 'fissile']:
+    if build_type not in ['spec', 'dsc', 'kiwi', 'arch', 'collax', 
'livebuild', 'simpleimage', 'snapcraft', 'appimage', 'docker', 'podman', 
'fissile']:
         raise oscerr.WrongArgs(
-                'Unknown build type: \'%s\'. Build description should end in 
.spec, .dsc, .kiwi, or .livebuild. Or being named PKGBUILD, build.collax, 
appimage.yml, snapcraft.yaml or Dockerfile' \
+                'Unknown build type: \'%s\'. Build description should end in 
.spec, .dsc, .kiwi, or .livebuild. Or being named PKGBUILD, build.collax, 
simpleimage, appimage.yml, snapcraft.yaml or Dockerfile' \
                         % build_type)
     if not os.path.isfile(build_descr):
         raise oscerr.WrongArgs('Error: build description file named \'%s\' 
does not exist.' % build_descr)
@@ -695,7 +702,7 @@
         s = ''
         for i in opts.define:
             s += "%%define %s\n" % i
-        build_descr_data = s.encode + build_descr_data
+        build_descr_data = s.encode() + build_descr_data
 
     cpiodata = None
     servicefile = os.path.join(os.path.dirname(build_descr), "_service")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-0.165.1/osc/commandline.py 
new/osc-0.165.2/osc/commandline.py
--- old/osc-0.165.1/osc/commandline.py  2019-05-20 08:35:27.000000000 +0200
+++ new/osc-0.165.2/osc/commandline.py  2019-07-08 11:28:50.000000000 +0200
@@ -462,8 +462,8 @@
     def do_addcontainers(self, subcmd, opts, *args):
         """${cmd_name}: Add maintained containers for a give package
 
-        The command adds all containers which are marked as maitained and 
contain
-        an rpm out of the specified source package.
+        The command adds all containers which are marked as maintained and 
contain
+        an rpm originating from the specified source package.
 
         Examples:
             osc addcontainers [PROJECT PACKAGE]
@@ -728,6 +728,8 @@
                         help='Create a new token')
     @cmdln.option('-d', '--delete', metavar='TOKENID',
                         help='Delete a token')
+    @cmdln.option('-o', '--operation', metavar='OPERATION',
+                        help='Default is "runservice", but "release" or 
"rebuild" can also be used')
     @cmdln.option('-t', '--trigger', metavar='TOKENSTRING',
                         help='Trigger the action of a token')
     def do_token(self, subcmd, opts, *args):
@@ -738,9 +740,9 @@
 
         Usage:
             osc token
-            osc token --create [<PROJECT> <PACKAGE>]
+            osc token --create [--operation <OPERATION>] [<PROJECT> <PACKAGE>]
             osc token --delete <TOKENID>
-            osc token --trigger <TOKENSTRING>
+            osc token --trigger <TOKENSTRING> [--operation <OPERATION>] 
[<PROJECT> <PACKAGE>]
         ${cmd_option_list}
         """
 
@@ -752,6 +754,8 @@
         if opts.create:
             print("Create a new token")
             url += "?cmd=create"
+            if opts.operation:
+                url += "&operation=" + opts.operation
             if len(args) > 1:
                 url += "&project=" + args[0]
                 url += "&package=" + args[1]
@@ -769,13 +773,17 @@
             http_DELETE(url)
         elif opts.trigger:
             print("Trigger token")
-            url = apiurl + "/trigger/runservice"
+            operation = opts.operation or "runservice"
+            url = apiurl + "/trigger/" + operation
+            if len(args) > 1:
+                url += "?project=" + args[0]
+                url += "&package=" + args[1]
             req = URLRequest(url)
             req.get_method = lambda: "POST"
             req.add_header('Content-Type', 'application/octet-stream')
             req.add_header('Authorization', "Token "+opts.trigger)
             fd = urlopen(req, data=None)
-            print(fd.read())
+            print(decode_it(fd.read()))
         else:
             if args and args[0] in ['create', 'delete', 'trigger']:
                 raise oscerr.WrongArgs("Did you mean --" + args[0] + "?")
@@ -1102,7 +1110,7 @@
                 attributepath.append(opts.attribute)
                 u = makeurl(apiurl, attributepath)
                 for data in streamfile(u, http_DELETE):
-                    sys.stdout.write(data)
+                    sys.stdout.write(decode_it(data))
             else:
                 raise oscerr.WrongOptions('The --delete switch is only for 
pattern metadata or attributes.')
 
@@ -1143,7 +1151,7 @@
         [See http://en.opensuse.org/openSUSE:Build_Service_Collaboration for 
information
         on this topic.]
 
-        See the "request" command for showing and modifing existing requests.
+        See the "request" command for showing and modifying existing requests.
 
         usage:
             osc submitreq [OPTIONS]
@@ -1664,7 +1672,7 @@
                 (project, package, user, role)
 
         if get_user_meta(apiurl, user) == None:
-            raise oscerr.WrongArgs('osc: an error occured.')
+            raise oscerr.WrongArgs('osc: an error occurred.')
 
         return actionxml
 
@@ -1735,7 +1743,7 @@
             actionxml = """ <action type="set_bugowner"> <target project="%s" 
%s /> <group name="%s" /> </action> """ % \
                     (project, package, group)
             if get_group_meta(apiurl, group) == None:
-                raise oscerr.WrongArgs('osc: an error occured.')
+                raise oscerr.WrongArgs('osc: an error occurred.')
         else:
             actionxml = """ <action type="set_bugowner"> <target project="%s" 
%s /> <person name="%s" /> </action> """ % \
                     (project, package, user)
@@ -2023,7 +2031,7 @@
         [See http://en.opensuse.org/openSUSE:Build_Service_Collaboration
         for information on this topic.]
 
-        See the "request" command for showing and modifing existing requests.
+        See the "request" command for showing and modifying existing requests.
 
         osc changedevelrequest PROJECT PACKAGE DEVEL_PROJECT [DEVEL_PACKAGE]
         """
@@ -2098,7 +2106,7 @@
     @cmdln.option('-i', '--interactive', action='store_true',
                         help='interactive review of request')
     @cmdln.option('--or-revoke', action='store_true',
-                        help='For automatisation scripts: accepts (if using 
with accept argument) a request when it is in new or review state. Or revoke it 
when it got declined. Otherwise just do nothing.')
+                        help='For automation scripts: accepts (if using with 
accept argument) a request when it is in new or review state. Or revoke it when 
it got declined. Otherwise just do nothing.')
     @cmdln.option('--non-interactive', action='store_true',
                         help='non-interactive review of request')
     @cmdln.option('--exclude-target-project', action='append',
@@ -2148,7 +2156,7 @@
 
         "checkout" will checkout the request's source package ("submit" 
requests only).
 
-        "priorize" change the prioritity of a request to either "critical", 
"important", "moderate" or "low"
+        "prioritize" change the priority of a request to either "critical", 
"important", "moderate" or "low"
 
 
         The 'review' command has the following sub commands:
@@ -2177,7 +2185,7 @@
             osc request setincident [-m TEXT] ID INCIDENT
             osc request supersede [-m TEXT] ID SUPERSEDING_ID
             osc request approvenew [-m TEXT] PROJECT
-            osc request priorize [-m TEXT] ID PRIORITY
+            osc request prioritize [-m TEXT] ID PRIORITY
 
             osc request checkout/co ID
             osc request clone [-m TEXT] ID
@@ -2218,7 +2226,7 @@
             return self.do_help(['help', 'request'])
 
         cmds = ['list', 'ls', 'log', 'show', 'decline', 'reopen', 'clone', 
'accept', 'approve', 'cancelapproval',
-                'approvenew', 'wipe', 'setincident', 'supersede', 'revoke', 
'checkout', 'co', 'priorize']
+                'approvenew', 'wipe', 'setincident', 'supersede', 'revoke', 
'checkout', 'co', 'priorize', 'prioritize']
         if subcmd != 'review' and args[0] not in cmds:
             raise oscerr.WrongArgs('Unknown request action %s. Choose one of 
%s.' \
                                                % (args[0], ', '.join(cmds)))
@@ -2236,7 +2244,7 @@
 
         if cmd in ['list']:
             min_args, max_args = 0, 2
-        elif cmd in ['supersede', 'setincident', 'priorize']:
+        elif cmd in ['supersede', 'setincident', 'prioritize', 'priorize']:
             min_args, max_args = 2, 2
         else:
             min_args, max_args = 1, 1
@@ -2275,7 +2283,7 @@
         elif cmd == 'setincident':
             reqid = args[0]
             incident = args[1]
-        elif cmd == 'priorize':
+        elif cmd in ['prioritize', 'priorize']:
             reqid = args[0]
             priority = args[1]
         elif cmd in ['log', 'add', 'show', 'decline', 'reopen', 'clone', 
'accept', 'wipe', 'revoke', 'checkout',
@@ -2302,7 +2310,7 @@
             print(ET.parse(r).getroot().get('code'))
 
         # change priority
-        elif cmd == 'priorize':
+        elif cmd in ['prioritize', 'priorize']:
             query = { 'cmd': 'setpriority', 'priority': priority }
             url = makeurl(apiurl, ['request', reqid], query)
             r = http_POST(url, data=opts.message)
@@ -2624,7 +2632,7 @@
                                         change_request_state(apiurl, 
req.reqid, 'superseded',
                                                              'superseded by 
%s' % rid, rid)
 
-    # editmeta and its aliases are all depracated
+    # editmeta and its aliases are all deprecated
     @cmdln.alias("editprj")
     @cmdln.alias("createprj")
     @cmdln.alias("editpac")
@@ -3069,7 +3077,7 @@
         [See 
http://openbuildservice.org/help/manuals/obs-reference-guide/cha.obs.maintenance_setup.html
          for information on this topic.]
 
-        This command is used by the maintence team to start the release 
process of a maintenance update.
+        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.
 
         usage:
@@ -3115,7 +3123,7 @@
         [See 
http://openbuildservice.org/help/manuals/obs-reference-guide/cha.obs.maintenance_setup.html
         for information on this topic.]
 
-        This command is asking to open an empty maintence incident. This can 
usually only be done by a responsible
+        This command is asking to open an empty maintenance incident. This can 
usually only be done by a responsible
         maintenance team.
         Please see the "mbranch" command on how to full such a project content 
and
         the "patchinfo" command how add the required maintenance update 
information.
@@ -3187,7 +3195,7 @@
         [See 
http://openbuildservice.org/help/manuals/obs-reference-guide/cha.obs.maintenance_setup.html
         for information on this topic.]
 
-        This command is asking the maintence team to start a maintence 
incident based on a
+        This command is asking the maintenance team to start a maintenance 
incident based on a
         created maintenance update. Please see the "mbranch" command on how to 
create such a project and
         the "patchinfo" command how add the required maintenance update 
information.
 
@@ -3833,9 +3841,9 @@
             baserev = linkinfo.get('baserev')
             opts.revision = baserev
             if pacs:
-                print("diff working copy against last commited version\n")
+                print("diff working copy against last committed version\n")
             else:
-                print("diff commited package against linked revision %s\n" % 
baserev)
+                print("diff committed package against linked revision %s\n" % 
baserev)
                 run_pager(server_diff(self.get_api_url(), 
linkinfo.get('project'), linkinfo.get('package'), baserev,
                   args[0], args[1], linkinfo.get('lsrcmd5'), not opts.plain, 
opts.missingok))
                 return
@@ -4189,7 +4197,7 @@
     def do_prdiff(self, subcmd, opts, *args):
         """${cmd_name}: Server-side diff of two projects
 
-        Compares two projects and either summarises or outputs the
+        Compares two projects and either summarizes or outputs the
         differences in full.  In the second form, a project is compared
         with one of its branches inside a home:$USER project (the branch
         is treated as NEWPRJ).  The home branch is optional if the current
@@ -5583,9 +5591,10 @@
         logfile = os.path.join(buildroot, '.build.log')
         if not os.path.isfile(logfile):
             raise oscerr.OscIOError(None, 'logfile \'%s\' does not exist' % 
logfile)
-        f = open(logfile, 'r')
+        f = open(logfile, 'rb')
         f.seek(offset)
         data = f.read(BUFSIZE)
+        data = decode_it(data)
         while len(data):
             if opts.strip_time or conf.config['buildlog_strip_time']:
                 data = buildlog_strip_time(data)
@@ -5605,7 +5614,7 @@
 
         Trigger reasons might be:
           - new build (never build yet or rebuild manually forced)
-          - source change (eg. on updating sources)
+          - source change (e.g. on updating sources)
           - meta change (packages which are used for building have changed)
           - rebuild count sync (In case that it is configured to sync release 
numbers)
 
@@ -5646,9 +5655,13 @@
         print(apiurl, project, package, repository, arch)
         xml = show_package_trigger_reason(apiurl, project, package, 
repository, arch)
         root = ET.fromstring(xml)
-        reason = root.find('explain').text
-        triggertime = time.strftime('%Y-%m-%d %H:%M:%S', 
time.gmtime(int(root.find('time').text)))
-        print("%s (at %s)" % (reason, triggertime))
+        if root.find('explain') is None:
+            reason = "No triggerreason found"
+            print(reason)
+        else:
+            reason = root.find('explain').text
+            triggertime = time.strftime('%Y-%m-%d %H:%M:%S', 
time.gmtime(int(root.find('time').text)))
+            print("%s (at %s)" % (reason, triggertime))
         if reason == "meta change":
             print("changed keys:")
             for package in root.findall('packagechange'):
@@ -5756,7 +5769,7 @@
 
         The arguments REPOSITORY and ARCH are optional. They can be taken from
         the first two columns of the 'osc repos' output. If not specified,
-        REPOSITORY defaults to the 'build_repositoy' config entry in your 
'oscrc'
+        REPOSITORY defaults to the 'build_repository' config entry in your 
'oscrc'
         and ARCH defaults to your host architecture.
 
         usage:
@@ -6092,16 +6105,26 @@
                     raise oscerr.WrongArgs("Repository is missing. Cannot 
guess build description without repository")
                 apiurl = self.get_api_url()
                 project = store_read_project('.')
-                bc = get_buildconfig(apiurl, project, arg_repository)
-                with tempfile.NamedTemporaryFile() as f:
-                    f.write(bc)
-                    f.flush()
-                    # some distros like Debian rename and move build to 
obs-build
-                    if not os.path.isfile('/usr/lib/build/queryconfig') and 
os.path.isfile('/usr/lib/obs-build/queryconfig'):
-                        queryconfig = '/usr/lib/obs-build/queryconfig'
+                # some distros like Debian rename and move build to obs-build
+                if not os.path.isfile('/usr/lib/build/queryconfig') and 
os.path.isfile('/usr/lib/obs-build/queryconfig'):
+                    queryconfig = '/usr/lib/obs-build/queryconfig'
+                else:
+                    queryconfig = '/usr/lib/build/queryconfig'
+                if noinit:
+                    bc_filename = '_buildconfig-%s-%s' % (arg_repository, 
arg_arch)
+                    if is_package_dir('.'):
+                        bc_filename = os.path.join(os.getcwd(), 
osc.core.store, bc_filename)
                     else:
-                        queryconfig = '/usr/lib/build/queryconfig'
-                    recipe = return_external(queryconfig, '--dist', f.name, 
'type')
+                        bc_filename = os.path.abspath(bc_filename)
+                    if not os.path.isfile(bc_filename):
+                        raise oscerr.WrongOptions('--offline is not possible, 
no local buildconfig file')
+                    recipe = return_external(queryconfig, '--dist', 
bc_filename, 'type')
+                else:
+                    bc = get_buildconfig(apiurl, project, arg_repository)
+                    with tempfile.NamedTemporaryFile() as f:
+                        f.write(bc)
+                        f.flush()
+                        recipe = return_external(queryconfig, '--dist', 
f.name, 'type')
                 recipe = recipe.strip()
                 if recipe == 'arch':
                     recipe = 'PKGBUILD'
@@ -6244,7 +6267,7 @@
         of the 'osc repos' output. BUILD_DESCR is either a RPM spec file, or a
         Debian dsc file.
 
-        The command honours packagecachedir, build-root and build-uid
+        The command honors packagecachedir, build-root and build-uid
         settings in oscrc, if present. You may want to set su-wrapper = 'sudo'
         in oscrc, and configure sudo with option NOPASSWD for /usr/bin/build.
 
@@ -7190,7 +7213,7 @@
         usage:
            osc getbinaries REPOSITORY                                 # works 
in checked out project/package (check out all archs in subdirs)
            osc getbinaries REPOSITORY ARCHITECTURE                    # works 
in checked out project/package
-           osc getbinaries PROJECT REPOSITORY ARCHITECTRUE
+           osc getbinaries PROJECT REPOSITORY ARCHITECTURE
            osc getbinaries PROJECT PACKAGE REPOSITORY ARCHITECTURE
            osc getbinaries PROJECT PACKAGE REPOSITORY ARCHITECTURE FILE
         ${cmd_option_list}
@@ -8744,10 +8767,10 @@
         to sign the public key with your own existing key.
 
         If a project has no key, the key from upper level project will
-        be used (eg. when dropping "KDE:KDE4:Community" key, the one from
+        be used (e.g. when dropping "KDE:KDE4:Community" key, the one from
         "KDE:KDE4" will be used).
 
-        WARNING: THE OLD KEY WILL NOT BE RESTORABLE WHEN USING DELETE OR CREATE
+        WARNING: THE OLD KEY CANNOT BE RESTORED AFTER USING DELETE OR CREATE
 
         ${cmd_usage}
         ${cmd_option_list}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-0.165.1/osc/core.py new/osc-0.165.2/osc/core.py
--- old/osc-0.165.1/osc/core.py 2019-05-20 08:35:27.000000000 +0200
+++ new/osc-0.165.2/osc/core.py 2019-07-08 11:28:50.000000000 +0200
@@ -5,7 +5,7 @@
 
 from __future__ import print_function
 
-__version__ = '0.165.1'
+__version__ = '0.165.2'
 
 # __store_version__ is to be incremented when the format of the working copy
 # "store" changes in an incompatible way. Please add any needed migration
@@ -3660,12 +3660,19 @@
         self.url = url
         self.change_is_required = change_is_required
         (fd, self.filename) = tempfile.mkstemp(prefix = 'osc_metafile.', 
suffix = file_ext)
-        if not input or isinstance(input[0], str) or isinstance(input, str):
-            f = os.fdopen(fd, 'w')
-            f.write(''.join(input))
-        else:
-            f = os.fdopen(fd, 'wb')
-            f.write(b''.join(input))
+
+        open_mode = 'w'
+        input_as_str = None
+
+        if not isinstance(input, list):
+            input = [input]
+        if input and isinstance(input[0], str):
+            input_as_str = ''.join(input)
+        else:
+            open_mode = 'wb'
+            input_as_str = b''.join(input)
+        f = os.fdopen(fd, open_mode)
+        f.write(input_as_str)
         f.close()
         self.hash_orig = dgst(self.filename)
 
@@ -3697,9 +3704,10 @@
                     print('BuildService API error:', error_help, 
file=sys.stderr)
                     # examine the error - we can't raise an exception because 
we might want
                     # to try again
-                    data = e.read()
-                    if b'<summary>' in data:
-                        
print(data.split(b'<summary>')[1].split(b'</summary>')[0], file=sys.stderr)
+                    root = ET.fromstring(e.read())
+                    summary = root.find('summary')
+                    if summary is not None:
+                        print(summary.text, file=sys.stderr)
                     ri = raw_input('Try again? ([y/N]): ')
                     if ri not in ['y', 'Y']:
                         break
@@ -4538,12 +4546,17 @@
         return True, reqs
     repl = ''
     if reqs:
-        print('There are already the following submit request: %s.' % \
-              ', '.join([i.reqid for i in reqs]))
-        repl = raw_input('Supersede the old requests? (y/n/c) ')
+        open_request_string = "The following submit request is already open:"
+        supersede_request_string = "Supersede the old request?"
+        if len(reqs) > 1:
+            open_request_string = "The following submit requests are already 
open:"
+            supersede_request_string = "Supersede the old requests?"
+        print('%s %s.' % \
+              (open_request_string, ', '.join([i.reqid for i in reqs])))
+        repl = raw_input('%s (y/n/c) ' % supersede_request_string)
         while repl.lower() not in ['c', 'y', 'n']:
             print('%s is not a valid option.' % repl)
-            repl = raw_input('Supersede the old requests? (y/n/c) ')
+            repl = raw_input('%s (y/n/c) ' % supersede_request_string)
         if repl.lower() == 'c':
             print('Aborting', file=sys.stderr)
             raise oscerr.UserAbort()
@@ -4561,12 +4574,17 @@
         return True, reqs
     repl = ''
     if reqs:
-        print('There are already the following maintenance incident request: 
%s.' % \
-              ', '.join([i.reqid for i in reqs]))
-        repl = raw_input('Supersede the old requests? (y/n/c) ')
+        open_request_string = "The following maintenance incident request is 
already open:"
+        supersede_request_string = "Supersede the old request?"
+        if len(reqs) > 1:
+            open_request_string = "The following maintenance incident requests 
are already open:"
+            supersede_request_string = "Supersede the old requests?"
+        print('%s %s.' % \
+              (open_request_string, ', '.join([i.reqid for i in reqs])))
+        repl = raw_input('%s (y/n/c) ' % supersede_request_string)
         while repl.lower() not in ['c', 'y', 'n']:
             print('%s is not a valid option.' % repl)
-            repl = raw_input('Supersede the old requests? (y/n/c) ')
+            repl = raw_input('%s (y/n/c) ' % supersede_request_string)
         if repl.lower() == 'c':
             print('Aborting', file=sys.stderr)
             raise oscerr.UserAbort()
@@ -6967,7 +6985,7 @@
         group=user.replace('group:', '')
         user=None
     if data:
-        root = ET.fromstring(''.join(data))
+        root = ET.fromstring(b''.join(data))
         for group_element in root.getiterator('group'):
             if  group_element.get('role') == "bugowner":
                 root.remove(group_element)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osc-0.165.1/osc/fetch.py new/osc-0.165.2/osc/fetch.py
--- old/osc-0.165.1/osc/fetch.py        2019-05-20 08:35:27.000000000 +0200
+++ new/osc-0.165.2/osc/fetch.py        2019-07-08 11:28:50.000000000 +0200
@@ -176,7 +176,7 @@
                     sys.exit(1)
                 canonname = pac_obj.binary
 
-        fullfilename = os.path.join(destdir, canonname)
+        fullfilename = os.path.join(destdir, decode_it(canonname))
         if pac_obj is not None:
             pac_obj.canonname = canonname
             pac_obj.fullfilename = fullfilename

++++++ osc.dsc ++++++
--- /var/tmp/diff_new_pack.NNcqZD/_old  2019-07-11 13:16:40.318799930 +0200
+++ /var/tmp/diff_new_pack.NNcqZD/_new  2019-07-11 13:16:40.322799930 +0200
@@ -1,6 +1,6 @@
 Format: 1.0
 Source: osc
-Version: 0.165.1
+Version: 0.165.2
 Binary: osc
 Maintainer: Adrian Schroeter <[email protected]>
 Architecture: any


Reply via email to