Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package osc for openSUSE:Factory checked in at 2023-04-11 15:54:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/osc (Old) and /work/SRC/openSUSE:Factory/.osc.new.19717 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "osc" Tue Apr 11 15:54:35 2023 rev:175 rq:1078423 version:1.1.1 Changes: -------- --- /work/SRC/openSUSE:Factory/osc/osc.changes 2023-04-03 21:49:25.104879589 +0200 +++ /work/SRC/openSUSE:Factory/.osc.new.19717/osc.changes 2023-04-11 15:54:39.094031783 +0200 @@ -1,0 +2,16 @@ +Tue Apr 11 12:04:56 UTC 2023 - Daniel Mach <daniel.m...@suse.com> + +- 1.1.1 + - Command-line: + - Fix 'creq' command that wasn't working at all + - Fix 'ls' command when listing all projects by setting project argument to '/' + - Fix regression: Run interactive config setup on missing config or credentials + - Append plugin dirs to sys.path to allow loading modules installed next to the plugins + - Do not recurse into subdirs when loading plugins + - Configuration: + - Display apiurl when asking for a username or a password + - If apiurl is not set in interactive_config_setup(), use apiurl from DEFAULTS + - Library: + - Decode entities in HTTPError message body + +------------------------------------------------------------------- @@ -4 +20 @@ -- Update to 1.1.0 +- 1.1.0 @@ -19 +35 @@ -- Update to 1.0.1 +- 1.0.1 @@ -28 +44 @@ -- Update to 1.0.0 (full changelog to the latest stable version 0.182.0) +- 1.0.0 (full changelog to the latest stable version 0.182.0) Old: ---- osc-1.1.0.tar.gz New: ---- osc-1.1.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ osc.spec ++++++ --- /var/tmp/diff_new_pack.zhx3Q8/_old 2023-04-11 15:54:39.630034878 +0200 +++ /var/tmp/diff_new_pack.zhx3Q8/_new 2023-04-11 15:54:39.638034924 +0200 @@ -49,7 +49,7 @@ %endif Name: osc -Version: 1.1.0 +Version: 1.1.1 Release: 0 Summary: Command-line client for the Open Build Service License: GPL-2.0-or-later ++++++ PKGBUILD ++++++ --- /var/tmp/diff_new_pack.zhx3Q8/_old 2023-04-11 15:54:39.670035108 +0200 +++ /var/tmp/diff_new_pack.zhx3Q8/_new 2023-04-11 15:54:39.674035132 +0200 @@ -1,5 +1,5 @@ pkgname=osc -pkgver=1.1.0 +pkgver=1.1.1 pkgrel=0 pkgdesc="Command-line client for the Open Build Service" arch=('x86_64') ++++++ debian.changelog ++++++ --- /var/tmp/diff_new_pack.zhx3Q8/_old 2023-04-11 15:54:39.710035340 +0200 +++ /var/tmp/diff_new_pack.zhx3Q8/_new 2023-04-11 15:54:39.714035363 +0200 @@ -1,2 +1,2 @@ -osc (1.1.0-0) unstable; urgency=low +osc (1.1.1-0) unstable; urgency=low ++++++ osc-1.1.0.tar.gz -> osc-1.1.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.1.0/NEWS new/osc-1.1.1/NEWS --- old/osc-1.1.0/NEWS 2023-04-03 13:45:36.000000000 +0200 +++ new/osc-1.1.1/NEWS 2023-04-11 14:01:52.000000000 +0200 @@ -1,3 +1,16 @@ +- 1.1.1 + - Command-line: + - Fix 'creq' command that wasn't working at all + - Fix 'ls' command when listing all projects by setting project argument to '/' + - Fix regression: Run interactive config setup on missing config or credentials + - Append plugin dirs to sys.path to allow loading modules installed next to the plugins + - Do not recurse into subdirs when loading plugins + - Configuration: + - Display apiurl when asking for a username or a password + - If apiurl is not set in interactive_config_setup(), use apiurl from DEFAULTS + - Library: + - Decode entities in HTTPError message body + - 1.1.0 - Command-line: - New class-based commands diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.1.0/osc/__init__.py new/osc-1.1.1/osc/__init__.py --- old/osc-1.1.0/osc/__init__.py 2023-04-03 13:45:36.000000000 +0200 +++ new/osc-1.1.1/osc/__init__.py 2023-04-11 14:01:52.000000000 +0200 @@ -13,7 +13,7 @@ from .util import git_version -__version__ = git_version.get_version('1.1.0') +__version__ = git_version.get_version('1.1.1') # vim: sw=4 et diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.1.0/osc/_private/api.py new/osc-1.1.1/osc/_private/api.py --- old/osc-1.1.0/osc/_private/api.py 2023-04-03 13:45:36.000000000 +0200 +++ new/osc-1.1.1/osc/_private/api.py 2023-04-11 14:01:52.000000000 +0200 @@ -168,6 +168,19 @@ return xml.sax.saxutils.escape(string, entities=entities) +def xml_unescape(string): + """ + Decode XML entities in the string. + """ + entities = { + """: "\"", + "'": "'", + } + if isinstance(string, bytes): + return xml.sax.saxutils.unescape(string.decode("utf-8"), entities=entities).encode("utf-8") + return xml.sax.saxutils.unescape(string, entities=entities) + + def xml_indent(root): """ Indent XML so it looks pretty after printing or saving to file. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.1.0/osc/babysitter.py new/osc-1.1.1/osc/babysitter.py --- old/osc-1.1.0/osc/babysitter.py 2023-04-03 13:45:36.000000000 +0200 +++ new/osc-1.1.1/osc/babysitter.py 2023-04-11 14:01:52.000000000 +0200 @@ -115,7 +115,7 @@ if b'<summary>' in body: msg = body.split(b'<summary>')[1] msg = msg.split(b'</summary>')[0] - msg = _private.api.xml_escape(msg) + msg = _private.api.xml_unescape(msg) print(decode_it(msg), file=sys.stderr) if e.code >= 500 and e.code <= 599: print(f'\nRequest: {e.filename}') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.1.0/osc/commandline.py new/osc-1.1.1/osc/commandline.py --- old/osc-1.1.0/osc/commandline.py 2023-04-03 13:45:36.000000000 +0200 +++ new/osc-1.1.1/osc/commandline.py 2023-04-11 14:01:52.000000000 +0200 @@ -259,7 +259,12 @@ def load_commands(self): for module_prefix, module_path in self.MODULES: module_path = os.path.expanduser(module_path) - for loader, module_name, _ in pkgutil.walk_packages(path=[module_path]): + + # some plugins have their modules installed next to them instead of site-packages + if module_path not in sys.path: + sys.path.append(module_path) + + for loader, module_name, _ in pkgutil.iter_modules(path=[module_path]): full_name = f"{module_prefix}.{module_name}" spec = loader.find_spec(full_name) mod = importlib.util.module_from_spec(spec) @@ -392,17 +397,33 @@ # let's leave setting the right value to conf.get_config() pass - conf.get_config( - override_apiurl=args.apiurl, - override_conffile=args.conffile, - override_debug=args.debug, - override_http_debug=args.http_debug, - override_http_full_debug=args.http_full_debug, - override_no_keyring=args.no_keyring, - override_post_mortem=args.post_mortem, - override_traceback=args.traceback, - override_verbose=args.verbose, - ) + try: + conf.get_config( + override_apiurl=args.apiurl, + override_conffile=args.conffile, + override_debug=args.debug, + override_http_debug=args.http_debug, + override_http_full_debug=args.http_full_debug, + override_no_keyring=args.no_keyring, + override_post_mortem=args.post_mortem, + override_traceback=args.traceback, + override_verbose=args.verbose, + ) + except oscerr.NoConfigfile as e: + print(e.msg, file=sys.stderr) + print(f"Creating osc configuration file {e.file} ...", file=sys.stderr) + conf.interactive_config_setup(e.file, args.apiurl) + print("done", file=sys.stderr) + self.post_parse_args(args) + except oscerr.ConfigMissingApiurl as e: + print(e.msg, file=sys.stderr) + conf.interactive_config_setup(e.file, e.url, initial=False) + self.post_parse_args(args) + except oscerr.ConfigMissingCredentialsError as e: + print(e.msg, file=sys.stderr) + print("Please enter new credentials.", file=sys.stderr) + conf.interactive_config_setup(e.file, e.url, initial=False) + self.post_parse_args(args) # write config values back to args # this is crucial mainly for apiurl to resolve an alias to full url @@ -1303,7 +1324,7 @@ # list sources elif not opts.binaries: - if not args: + if not args or not project: for prj in meta_get_project_list(apiurl, opts.deleted): print(prj) @@ -2369,27 +2390,6 @@ change_request_state(apiurl, opts.supersede, 'superseded', opts.message or '', result) - def _actionparser(self, opt_str, value, parser): - value = [] - if not hasattr(parser.values, 'actiondata'): - setattr(parser.values, 'actiondata', []) - if parser.values.actions is None: - parser.values.actions = [] - - rargs = parser.rargs - while rargs: - arg = rargs[0] - if ((arg[:2] == "--" and len(arg) > 2) or - (arg[:1] == "-" and len(arg) > 1 and arg[1] != "-")): - break - else: - value.append(arg) - del rargs[0] - - parser.values.actions.append(value[0]) - del value[0] - parser.values.actiondata.append(slash_split(value)) - def _submit_request(self, args, opts, options_block): actionxml = "" apiurl = self.get_api_url() @@ -2663,9 +2663,8 @@ return actionxml -# TODO: fix ValueError: unknown action "callback" -# @cmdln.option('-a', '--action', action='callback', callback = _actionparser, dest = 'actions', -# help='specify action type of a request, can be : submit/delete/change_devel/add_role/set_bugowner') + @cmdln.option('-a', '--action', action='append', nargs='+', metavar=('ACTION', '[ARGS]'), dest='actions', default=[], + help='specify action type of a request, can be : submit/delete/change_devel/add_role/set_bugowner') @cmdln.option('-m', '--message', metavar='TEXT', help='specify message TEXT') @cmdln.option('-r', '--revision', metavar='REV', @@ -2723,42 +2722,29 @@ apiurl = self.get_api_url() - i = 0 actionsxml = "" supersede = set() - for ai in opts.actions: - if ai == 'submit': - args = opts.actiondata[i] - i = i + 1 + for actiondata in opts.actions: + action = actiondata[0] + args = actiondata[1:] + if action == 'submit': actions, to_supersede = self._submit_request(args, opts, options_block) actionsxml += actions supersede.update(to_supersede) - elif ai == 'delete': - args = opts.actiondata[i] + elif action == 'delete': actionsxml += self._delete_request(args, opts) - i = i + 1 - elif ai == 'change_devel': - args = opts.actiondata[i] + elif action == 'change_devel': actionsxml += self._changedevel_request(args, opts) - i = i + 1 - elif ai == 'add_me': - args = opts.actiondata[i] + elif action == 'add_me': actionsxml += self._add_me(args, opts) - i = i + 1 - elif ai == 'add_group': - args = opts.actiondata[i] + elif action == 'add_group': actionsxml += self._add_group(args, opts) - i = i + 1 - elif ai == 'add_role': - args = opts.actiondata[i] + elif action == 'add_role': actionsxml += self._add_user(args, opts) - i = i + 1 - elif ai == 'set_bugowner': - args = opts.actiondata[i] + elif action == 'set_bugowner': actionsxml += self._set_bugowner(args, opts) - i = i + 1 else: - raise oscerr.WrongArgs('Unsupported action %s' % ai) + raise oscerr.WrongArgs(f"Unsupported action {action}") if actionsxml == "": sys.exit('No actions need to be taken.') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.1.0/osc/conf.py new/osc-1.1.1/osc/conf.py --- old/osc-1.1.0/osc/conf.py 2023-04-03 13:45:36.000000000 +0200 +++ new/osc-1.1.1/osc/conf.py 2023-04-11 14:01:52.000000000 +0200 @@ -972,6 +972,9 @@ def interactive_config_setup(conffile, apiurl, initial=True): + if not apiurl: + apiurl = DEFAULTS["apiurl"] + scheme = urlsplit(apiurl)[0] http = scheme == "http" if http: @@ -984,8 +987,11 @@ raise oscerr.UserAbort() print() - user = raw_input('Username: ') - passwd = getpass.getpass() + apiurl_no_scheme = urlsplit(apiurl)[1] + user_prompt = f"Username [{apiurl_no_scheme}]: " + user = raw_input(user_prompt) + pass_prompt = f"Password [{user}@{apiurl_no_scheme}]: " + passwd = getpass.getpass(pass_prompt) creds_mgr_descr = select_credentials_manager_descr() if initial: config = {'user': user, 'pass': passwd} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-1.1.0/osc/util/git_version.py new/osc-1.1.1/osc/util/git_version.py --- old/osc-1.1.0/osc/util/git_version.py 2023-04-03 13:45:36.000000000 +0200 +++ new/osc-1.1.1/osc/util/git_version.py 2023-04-11 14:01:52.000000000 +0200 @@ -9,7 +9,7 @@ """ # the `version` variable contents get substituted during `git archive` # it requires adding this to .gitattributes: <path to this file> export-subst - version = "1.1.0" + version = "1.1.1" if version.startswith(("$", "%")): # "$": version hasn't been substituted during `git archive` # "%": "Format:" and "$" characters get removed from the version string (a GitHub bug?) ++++++ osc.dsc ++++++ --- /var/tmp/diff_new_pack.zhx3Q8/_old 2023-04-11 15:54:40.066037395 +0200 +++ /var/tmp/diff_new_pack.zhx3Q8/_new 2023-04-11 15:54:40.070037417 +0200 @@ -1,6 +1,6 @@ Format: 1.0 Source: osc -Version: 1.1.0-0 +Version: 1.1.1-0 Binary: osc Maintainer: Adrian Schroeter <adr...@suse.de> Architecture: any