Package: dh-python Version: 3.20180326 Severity: normal -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Hello, After packaging and uploading reposurgeon (3.44-1) which switched to PyPy recently, I encounter the following error when trying to install it: Unpacking reposurgeon (3.44-1) ... dpkg: dependency problems prevent configuration of reposurgeon: reposurgeon depends on pypy:any. reposurgeon depends on pypy; however: Package pypy is not installed. dpkg: error processing package reposurgeon (--install): dependency problems - leaving unconfigured Errors were encountered while processing: reposurgeon Apparently, my "Depends: ${python:Depends}, pypy" got turned into "pypy:any, pypy", of which "pypy:any" is uninstallable. Same problem with dh_python3 and ${python3:Depends}. I later on realized there is a dh_pypy, and I should have changed "dh $@ --with python2" to "dh $@ --with pypy", and "${python:Depends}" to "${pypy:Depends}". However, I think dh_python2 and dh_python3 should not generate something like "pypy:any" which dpkg cannot install. As an experiment, I manually changed some of the shebang lines in the Python scripts in debian/<package>/usr/bin/ so that we have all #!/usr/bin/pypy, #!/usr/bin/python, and #!/usr/bin/python3. Running "dh_{python2,python3,pypy} -v" then gives the following info: D: dh_python2 depends:272: D={'pypy:any', 'python:any', 'python3:any'}; R=[]; S=[]; E=[], B=[]; RT=[] D: dh_python3 depends:272: D={'pypy:any', 'python:any', 'python3:any'}; R=[]; S=[]; E=[], B=[]; RT=[] D: dh_pypy depends:272: D={'pypy', 'python', 'python3'}; R=[]; S=[]; E=[], B=[]; RT=[] As you can see, dh_python{2,3} appends ":any" to everything, and dh_pypy doesn't add ":any" whatsoever. Is that the right behaviour? I expecting to see something "D={'pypy', 'python:any', 'python3:any'};" no matter which of dh_{python2,python3,pypy} is used. So, with the current behaviour, if a hypothetical Debian package has this: [debian/rules] dh $@ --with pypy,python2,python3 [debian/control] Depends: ${pypy:Depends}, ${python:Depends}, ${python3:Depends} We would end up with this: Depends: pypy, python, python3, pypy:any, python3:any, python:any which doesn't look right? Admittedly, I am personally struggling with a question in my mind: what does that ":any" do exactly? I saw this changelog entry from 2013 "generate :any dependencies to specify range of supported Python versions" but I still don't quite understand what it does, and why dpkg recognizes python:any and python3:any but not pypy:any. Many thanks! Anthony Fok - -- System Information: Debian Release: buster/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.16.0-2-amd64 (SMP w/4 CPU cores) Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8), LANGUAGE=en_CA.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages dh-python depends on: ii python3 3.6.6-1 Versions of packages dh-python recommends: ii python3-distutils 3.6.6-1 Versions of packages dh-python suggests: ii dpkg-dev 1.19.0.5 ii libdpkg-perl 1.19.0.5 - -- no debconf information -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEFCQhsZrUqVmW+VBy6iUAtBLFms8FAltIpbcACgkQ6iUAtBLF ms/8gA/8CUhvfyu5KKeFc92m48AyihrqgDogtjxS9p1dppeIuXN4ffl/1FzCJWp/ qh6OsYP+BCWA+0K7n3v7VR4YO8ta/uzZKH08UsKR+C1LgP8ctmYKrD2N2RGkotQs t+7+sIIQjXCEdT++Uum1DDEFe6qQd+rbT1t/BQGbL8j9q7xNqTOuYqpOiKHfB/La UcF0uTnyA6T8aEojNDJ/RtNBITjwVZmoQtYN1njDMMw68aB4k4+KoEzZseJYelQB OuZRDQg0M3VA/qt+ncTfT8QK6+ZpRy5H5RsMvmU284d4Lv5iH0JrJi+eEi4r88Eh WbVBssmi1NICm6GNQdAB5KI3k2pw9hFuch8c9ARLWK6+gfwZhGLtMX6tfARjRTov jrnkMcZA0PJusvlrIOuazlrz2IrDFlIMchCCPD39NyfT/BvJTJGOtPueB1Rb/SQg RE0MtWgx9MpD0/yx3QexdeWU3rVkGqLguLrkQNWi86UQx0kVAQ8GAackjmF+ljus 77IZf5YqSoepGvv22f/JkBp9fJJhE+nvN8lejDQnPNhpH9m7+5ldzHNPrZey++Te wrqpAt3Jx6MwXfmZVy1eMZ0Tl79KoUdjcZKMvmAen0l9I/NE2oVqKQlYTAg1O+Ox 89/mzJtbBx7N+z0ssqXV6TTnS5QOvZF1282JX29L5NFnPnIdsC0= =m3AE -----END PGP SIGNATURE-----