File osc.patch of Package osc

Index: osc-1.19.0/osc/build.py
===================================================================
--- osc-1.19.0.orig/osc/build.py
+++ osc-1.19.0/osc/build.py
@@ -37,7 +37,7 @@ change_personality = {
     'i686': 'linux32',
     'i586': 'linux32',
     'i386': 'linux32',
-    'ppc': 'powerpc32',
+    'ppc': 'linux32',
     's390': 's390',
     'sparc': 'linux32',
     'sparcv8': 'linux32',
@@ -979,10 +979,12 @@ def main(apiurl, store, opts, argv):
     cache_dir = config['packagecachedir'] % {'apihost': apihost}
 
     extra_pkgs = []
-    if not opts.extra_pkgs:
+    if not opts.extra_pkgs or not '' in opts.extra_pkgs:
         extra_pkgs = config.get('extra-pkgs', [])
-    elif opts.extra_pkgs != ['']:
+    if opts.extra_pkgs:
         extra_pkgs = opts.extra_pkgs
+        while '' in extra_pkgs:
+            extra_pkgs.remove('')
 
     if opts.extra_pkgs_from:
         for filename in opts.extra_pkgs_from:
Index: osc-1.19.0/osc/commands/fork.py
===================================================================
--- osc-1.19.0.orig/osc/commands/fork.py
+++ osc-1.19.0/osc/commands/fork.py
@@ -73,6 +73,9 @@ class ForkCommand(osc.commandline.OscCom
         is_package = package is not None
         use_devel_project = False
 
+        if project == '.':
+            project = osc.commandline.Osc._process_project_name(self, project)
+
         if not is_package and args.target_package:
             self.parser.error("The '--target-package' option requires the 'package' argument to be set")
 
@@ -174,7 +177,7 @@ class ForkCommand(osc.commandline.OscCom
             project,
             package if is_package else "_project",
             scmsync=fork_scmsync,
-            target_project=args.target_project,
+            target_project=osc.commandline.Osc._process_project_name(self, args.target_project) if args.target_project else None,
             target_package=args.target_package if is_package else None,
         )
         # XXX: the current OBS API is not ideal; we don't get any info whether the new package exists already; 404 would be probably nicer
Index: osc-1.19.0/osc/conf.py
===================================================================
--- osc-1.19.0.orig/osc/conf.py
+++ osc-1.19.0/osc/conf.py
@@ -1721,13 +1721,13 @@ def config_set_option(section, opt, val=
                     creds_mgr_new = creds_mgr_descr.create(cp)
                 else:
                     creds_mgr_new = creds_mgr
-                creds_mgr_new.set_password(section, user, val)
+                creds_mgr_new.set_password(section, user, str(val))
                 write_config(config['conffile'], cp)
                 opt = credentials.AbstractCredentialsManager.config_entry
                 old_pw = None
             finally:
                 if old_pw is not None:
-                    creds_mgr.set_password(section, user, old_pw)
+                    creds_mgr.set_password(section, user, str(old_pw))
                     # not nice, but needed if the Credentials Manager will change
                     # something in cp
                     write_config(config['conffile'], cp)
Index: osc-1.19.0/osc/core.py
===================================================================
--- osc-1.19.0.orig/osc/core.py
+++ osc-1.19.0/osc/core.py
@@ -31,6 +31,7 @@ from pathlib import Path
 from typing import Optional, Dict, Union, List, Iterable
 from urllib.parse import parse_qs, urlsplit, urlunsplit, urlparse, urlunparse, quote, urlencode, unquote
 from urllib.error import HTTPError
+from urllib3.exceptions import ProtocolError
 from xml.etree import ElementTree as ET
 
 try:
@@ -4661,17 +4662,20 @@ def print_buildlog(
             for data in streamfile(u):
                 offset += len(data)
                 print_data(data, strip_time)
-        except IncompleteRead as e:
-            if retry_count >= 3:
+                retry_count = 0
+        except ProtocolError as e:
+            if retry_count >= 3 or not isinstance(e.args[1], IncompleteRead):
                 raise e
             retry_count += 1
-            data = e.partial
+            data = e.args[1].partial
             if len(data):
                 offset += len(data)
                 print_data(data, strip_time)
+                retry_count = 0
             continue
         if start_offset == offset:
             break
+        retry_count = 0
 
 
 def get_dependson(apiurl: str, project: str, repository: str, arch: str, packages=None, reverse=None):
openSUSE Build Service is sponsored by