diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2c97f02238adb1e86c67d4b6f29b14299d57d89b..aa5c58c4d147d15f11d072363f73564780ea3a85 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ variables: - PYTHON: python3.11 + PYTHON: python3.12 default: image: debian:testing-slim diff --git a/osc_plugin_dput/main.py b/osc_plugin_dput/main.py index 1ff6ed8a2eeefa185cfc380192624407761bd5f8..ac8a533b7c23028ca2f56741819adb604b89c214 100644 --- a/osc_plugin_dput/main.py +++ b/osc_plugin_dput/main.py @@ -192,13 +192,18 @@ def do_dput(self, subcmd, opts, *args): superseded = set() retained = set() + # osc <1.6.1 doesn't automatically escape path members. + should_escape_filename = osc.core.makeurl('', ['+']) == '/+' + for f in remote_file_list.keys(): if f.endswith('.dsc'): u = osc.core.makeurl(conf.config['apiurl'], ['source', proj_name, package_name, - pathname2url(f)], + pathname2url(f) + if should_escape_filename + else f], query={}) remote_dsc = Dsc(osc.core.streamfile(u, bufsize='line'))