File osc.patch of Package osc
Index: osc-1.10.1/osc/build.py
===================================================================
--- osc-1.10.1.orig/osc/build.py
+++ osc-1.10.1/osc/build.py
@@ -967,10 +967,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.10.1/osc/conf.py
===================================================================
--- osc-1.10.1.orig/osc/conf.py
+++ osc-1.10.1/osc/conf.py
@@ -1697,13 +1697,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.10.1/osc/core.py
===================================================================
--- osc-1.10.1.orig/osc/core.py
+++ osc-1.10.1/osc/core.py
@@ -33,6 +33,7 @@ from pathlib import Path
from typing import Optional, Dict, Union, List, Iterable
from urllib.parse import urlsplit, urlunsplit, urlparse, quote, urlencode, unquote
from urllib.error import HTTPError
+from urllib3.exceptions import ProtocolError
from xml.etree import ElementTree as ET
try:
@@ -4458,7 +4459,7 @@ def get_prj_results(
if i == "expansion error":
continue
legend.append('%3s %-20s' % (j, i))
- legend.append(' ? buildstatus not available (only new packages)')
+ legend.append('%3s %-20s' % ('?', 'unknown'))
if vertical:
for i in range(0, len(targets)):
@@ -4576,17 +4577,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):
Index: osc-1.10.1/osc/obs_api/enums.py
===================================================================
--- osc-1.10.1.orig/osc/obs_api/enums.py
+++ osc-1.10.1/osc/obs_api/enums.py
@@ -34,6 +34,7 @@ class BuildArch(str, Enum):
ATHLON = "athlon"
IA64 = "ia64"
K1OM = "k1om"
+ LOONGARCH64 = "loongarch64"
MIPS = "mips"
MIPSEL = "mipsel"
MIPS32 = "mips32"