Package: dh-python Version: 4.20191017 Severity: normal Tags: patch Dear Maintainer,
dpkg-gencontrol emits warnings for defined but unused subst variables. An example: dpkg-gencontrol: warning: package python3-notcurses: substitution variable ${python3:Versions} unused, but is defined dpkg-gencontrol: warning: package python3-notcurses: substitution variable ${python3:Versions} unused, but is defined dh-python, through both dh_python2 and dh_python3, emits a definition for python3:Versions (or python:Versions in the former case). So far as I can tell, this was done in conjunction with an XB-Python-Version initiative which has since been deprecated: "The use of XB-Python-Version in the binary package paragraphs of debian/control file has been deprecated and should be removed in the normal course of package updates. It never achieved sufficient deployment to support its intended purpose of managing Python transitions. This purpose can be adequately accomplished by examining package dependencies." --https://www.debian.org/doc/packaging-manuals/python-policy/ch- module_packages.html "unused substitution,variable ${python:Versions}" --https://lists.debian.org/debian-python/2010/07/msg00011.html I am not a Python expert by any means, so I might be missing something. If not, this warning is annoying, and there seems no reason to emit the subst. This patch removes it (also available from g...@salsa.debian.org:nickblack-guest/dh-python.git). ---------------------------------- diff --git dh_python2 dh_python2 index 64cd438..36dd797 100755 --- dh_python2 +++ dh_python2 @@ -439,8 +439,6 @@ def main(): dependencies.parse(stats, options) if stats['public_vers']: - dh.addsubstvar(package, 'python:Versions', - ', '.join(str(i) for i in sorted(stats['public_vers']))) ps = package.split('-', 1) if len(ps) > 1 and ps[0] == 'python': dh.addsubstvar(package, 'python:Provides', diff --git dh_python3 dh_python3 index 5f58d9b..77a75c0 100755 --- dh_python3 +++ dh_python3 @@ -201,8 +201,6 @@ def main(): dependencies.parse(stats, options) if stats['ext_vers']: - dh.addsubstvar(package, 'python3:Versions', - ', '.join(str(v) for v in sorted(stats['ext_vers']))) ps = package.split('-', 1) if len(ps) > 1 and ps[0] == 'python3': dh.addsubstvar(package, 'python3:Provides', ---------------------------------- -- System Information: Debian Release: bullseye/sid APT prefers unstable APT policy: (300, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 5.5.3nlb (SMP w/20 CPU cores) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages dh-python depends on: ii python3 3.7.5-3 ii python3-distutils 3.8.0-1 dh-python recommends no packages. Versions of packages dh-python suggests: ii dpkg-dev 1.19.7 ii libdpkg-perl 1.19.7 -- no debconf information
>From cf21b467f3051a69a27ef2aacd4cb29736d4f3f7 Mon Sep 17 00:00:00 2001 From: nick black <dankamong...@gmail.com> Date: Thu, 20 Feb 2020 22:37:54 -0500 Subject: [PATCH] Don't emit python[3]:Versions --- dh_python2 | 2 -- dh_python3 | 2 -- 2 files changed, 4 deletions(-) diff --git dh_python2 dh_python2 index 64cd438..36dd797 100755 --- dh_python2 +++ dh_python2 @@ -439,8 +439,6 @@ def main(): dependencies.parse(stats, options) if stats['public_vers']: - dh.addsubstvar(package, 'python:Versions', - ', '.join(str(i) for i in sorted(stats['public_vers']))) ps = package.split('-', 1) if len(ps) > 1 and ps[0] == 'python': dh.addsubstvar(package, 'python:Provides', diff --git dh_python3 dh_python3 index 5f58d9b..77a75c0 100755 --- dh_python3 +++ dh_python3 @@ -201,8 +201,6 @@ def main(): dependencies.parse(stats, options) if stats['ext_vers']: - dh.addsubstvar(package, 'python3:Versions', - ', '.join(str(v) for v in sorted(stats['ext_vers']))) ps = package.split('-', 1) if len(ps) > 1 and ps[0] == 'python3': dh.addsubstvar(package, 'python3:Provides', -- 2.25.1