Your message dated Fri, 31 Jan 2020 17:23:23 +0000
with message-id <e1ixa0p-0007qc...@fasolo.debian.org>
and subject line Bug#948299: fixed in osc-plugins-dput 20200114+git05dae35-1
has caused the Debian Bug report #948299,
regarding osc-plugins-dput: Doesn't work with Python 3 version of osc
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
948299: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=948299
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: osc-plugins-dput
Version: 20180227.1-1
Severity: grave
Justification: renders package unusable
Tags: patch upstream

$ osc -A xxx dput xxx:xxx ~/tmp/build-area/xxx_source.changes
Traceback (most recent call last):
  File "/usr/bin/osc", line 41, in <module>
    r = babysitter.run(osccli)
...
  File "/usr/lib/osc-plugins/dput.py", line 30, in do_dput
    osc_plugins_dput.do_dput(self, subcmd, opts, proj_name, dsc_file)
  File "/usr/share/osc-plugins-dput/osc_plugins_dput.py", line 161, in do_dput
    package_list = osc.core.meta_get_packagelist(conf.config['apiurl'], 
dput.PROJECT_NAME)
  File "/usr/lib/python3/dist-packages/osc/core.py", line 3442, in 
meta_get_packagelist
    u = makeurl(apiurl, ['source', prj], query)
  File "/usr/lib/python3/dist-packages/osc/core.py", line 3316, in makeurl
    return urlunsplit((scheme, netloc, '/'.join([path] + list(l)), query, ''))
TypeError: sequence item 2: expected str instance, bytes found

and with that fixed:

$ osc -A xxx dput xxx:xxx ~/tmp/build-area/xxx_source.changes
Traceback (most recent call last):
  File "/usr/bin/osc", line 41, in <module>
    r = babysitter.run(osccli)
...
  File "/usr/lib/osc-plugins/dput.py", line 30, in do_dput
    osc_plugins_dput.do_dput(self, subcmd, opts, proj_name, dsc_file)
  File "/usr/share/osc-plugins-dput/osc_plugins_dput.py", line 170, in do_dput
    dput._create_package()
  File "/usr/share/osc-plugins-dput/osc_plugins_dput.py", line 84, in 
_create_package
    osc.core.createPackageDir(self.PACKAGE_NAME)
  File "/usr/lib/python3/dist-packages/osc/core.py", line 7078, in 
createPackageDir
    if is_project_dir(prj_dir):
  File "/usr/lib/python3/dist-packages/osc/core.py", line 3088, in 
is_project_dir
    return os.path.exists(os.path.join(d, store, '_project')) and not \
  File "/usr/lib/python3.7/posixpath.py", line 94, in join
    genericpath._check_arg_types('join', a, *p)
  File "/usr/lib/python3.7/genericpath.py", line 155, in _check_arg_types
    raise TypeError("Can't mix strings and bytes in path components") from None
TypeError: Can't mix strings and bytes in path components

I attach a possible patch, although this seems to have been fixed
differently upstream.

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'stable-updates'), (500, 
'buildd-unstable'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.4.0-1-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages osc-plugins-dput depends on:
ii  osc             0.167.1-1
ii  python3-debian  0.1.36

osc-plugins-dput recommends no packages.

osc-plugins-dput suggests no packages.

-- no debconf information

-- debsums errors found:
debsums: changed file /usr/share/osc-plugins-dput/osc_plugins_dput.py (from 
osc-plugins-dput package)
>From 343315308c7ed9f7f3635be30766c9a8a06581f9 Mon Sep 17 00:00:00 2001
From: Simon McVittie <s...@collabora.com>
Date: Mon, 6 Jan 2020 20:02:14 +0000
Subject: [PATCH] Be compatible with Python 3 osc

---
 osc_plugins_dput.py | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/osc_plugins_dput.py b/osc_plugins_dput.py
index f54b4f0..dbdb066 100644
--- a/osc_plugins_dput.py
+++ b/osc_plugins_dput.py
@@ -6,6 +6,7 @@ import os
 import osc.cmdln as cmdln
 import osc.conf as conf
 import osc.core
+import sys
 
 try:
     from debian.deb822 import Changes, Dsc
@@ -126,12 +127,21 @@ class DPut(object):
 
         return fileList
 
+
+if sys.version_info[0] >= 3:
+    def str_cast(s):
+        return s
+else:
+    def str_cast(s):
+        return s.encode('utf-8')
+
+
 @cmdln.option('--maintained-in-git', action='store_true',
               help='add MAINTAINED_IN_GIT.txt')
 def do_dput(self, subcmd, opts, proj_name, dsc_or_changes_file):
     dput = DPut()
 
-    dput.PROJECT_NAME = proj_name.encode("utf8")
+    dput.PROJECT_NAME = str_cast(proj_name)
     dput.WORKING_DIR = tempfile.mkdtemp('_oscdput')
     def cleanup(dirname, initdir):
         os.chdir(initdir)
@@ -144,8 +154,8 @@ def do_dput(self, subcmd, opts, proj_name, dsc_or_changes_file):
     # get debian .change object before moving current path to the
     # working_dir
     changes, dsc, dsc_file = _get_objects_from_file(dsc_or_changes_file)
-    dput.PACKAGE_NAME = dsc.get("Source").encode('utf8') # XXX: needs to be utf8!!!
-    dput.PACKAGE_VERSION = dsc.get("Version")
+    dput.PACKAGE_NAME = str_cast(dsc.get("Source"))
+    dput.PACKAGE_VERSION = str_cast(dsc.get("Version"))
 
     # Filenames in the .dsc are relative to the directory where it appears.
     # We need to make it absolute before we chdir elsewhere.
-- 
2.25.0.rc0


--- End Message ---
--- Begin Message ---
Source: osc-plugins-dput
Source-Version: 20200114+git05dae35-1

We believe that the bug you reported is fixed in the latest version of
osc-plugins-dput, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 948...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Andrej Shadura <andre...@debian.org> (supplier of updated osc-plugins-dput 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Fri, 31 Jan 2020 18:07:08 +0100
Source: osc-plugins-dput
Architecture: source
Version: 20200114+git05dae35-1
Distribution: unstable
Urgency: medium
Maintainer: Héctor Orón Martínez <zu...@debian.org>
Changed-By: Andrej Shadura <andre...@debian.org>
Closes: 948299
Changes:
 osc-plugins-dput (20200114+git05dae35-1) unstable; urgency=medium
 .
   * New upstream snapshot (Really closes: #948299).
   * Add watch file.
   * Use pybuild.
Checksums-Sha1:
 dc98b9a9edeb2e8cb85cfe28690c9b5aaa73e626 1929 
osc-plugins-dput_20200114+git05dae35-1.dsc
 74d21b1d966ca1b9a4f6eac24b306b2e9b210b21 5304 
osc-plugins-dput_20200114+git05dae35.orig.tar.xz
 03b0a7a83d27546a7731355d850026303571137a 2132 
osc-plugins-dput_20200114+git05dae35-1.debian.tar.xz
Checksums-Sha256:
 494bb55c12e546917e2f087a7f0fe16e6eca0a95a5c289b767f6a91a9a542dff 1929 
osc-plugins-dput_20200114+git05dae35-1.dsc
 6e0d00485a52053b84e3f6817116c51e35ed01c2d4a7fff3cfd772eb8880f2f8 5304 
osc-plugins-dput_20200114+git05dae35.orig.tar.xz
 616468c091b8334dec502d2c6f28963d9abef0b2f1b39f4abb7c7df4f9ed4daa 2132 
osc-plugins-dput_20200114+git05dae35-1.debian.tar.xz
Files:
 ea2319999fca36edc9053dfe350a4e7b 1929 devel optional 
osc-plugins-dput_20200114+git05dae35-1.dsc
 68a2edd0861b69e3e5bce134acf2ff11 5304 devel optional 
osc-plugins-dput_20200114+git05dae35.orig.tar.xz
 6971bbff40841e7033bbdae0c1d78429 2132 devel optional 
osc-plugins-dput_20200114+git05dae35-1.debian.tar.xz

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEeuS9ZL8A0js0NGiOXkCM2RzYOdIFAl40X2sACgkQXkCM2RzY
OdI7Rgf+ITyCfSwa+/q7TvRvBpXURPh7VMczZaPf9v+4NxkLBdUvesru4f4kxfix
9RWjv7n2/WjGMQLZ4YY5f/+qj9fMFKCJczJ+4fsjquCJAGRfn/YFtiVeto6qsDTA
R7FjFC1g3oDMEhX5ozzW93bJkgCuTNUn4lm/dzLJbnAfxjEefddryZqHPhV0tqGl
SztuEEQRYvCEW7UGdEwlsoEfPXx0kQD1Gus75aUGQVass5F+YHiqj3K2PaOVcUPC
VuYGeOO3sv/7pNcSIPDZTA64XoJL2NErXeGLvV5QTAWtzVOAc0ycqoYd8pwa0UxV
lgLvzQnatmorpZZWM/PTiaQ4At7xOg==
=SXAB
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to