#1146581 python3 fails to install when a m-a:same module is installed

Package:
python3
Source:
python3
Description:
interactive high-level object-oriented language (default python3 version)
Submitter:
Helmut Grohne
Date:
2026-09-03 12:55:02 UTC
Severity:
normal
#1146581#5
Date:
2026-09-03 12:52:32 UTC
From:
To:
Reproducer:

mmdebstrap unstable /dev/null --verbose --variant=essential --architecture=amd64,i386 --include=qmake6,qmake6:i386,python3

| Setting up python3 (3.13.9-3+b1) ...
| Traceback (most recent call last):
|   File "/usr/bin/py3clean", line 199, in <module>
|     main()
|     ~~~~^^
|   File "/usr/bin/py3clean", line 185, in main
|     pfiles = set(dpf.from_package(options.package))
|   File "/usr/share/python3/debpython/files.py", line 55, in from_package
|     raise Exception("cannot get content of %s" % package_name)
| Exception: cannot get content of qmake6
| error running python rtupdate hook qmake6-aarch64-linux-gnu
| Traceback (most recent call last):
|   File "/usr/bin/py3clean", line 199, in <module>
|     main()
|     ~~~~^^
|   File "/usr/bin/py3clean", line 185, in main
|     pfiles = set(dpf.from_package(options.package))
|   File "/usr/share/python3/debpython/files.py", line 55, in from_package
|     raise Exception("cannot get content of %s" % package_name)
| Exception: cannot get content of qmake6
| error running python rtupdate hook qmake6-i686-linux-gnu
| dpkg: error processing package python3 (--configure):
|  old python3 package postinst maintainer script subprocess failed with exit status 4

The root cause here is that py3clean and the from_package function
assume that you an take a binary package name and ask dpkg for files via
"dpkg -L packagename". dpkg will tell that it doesn't know which
instance you refer to and exit non-zero. From there we get the
exception. This is not specific to qmake6. What you need to reproduce
is:
 * Multi-Arch: same
 * No dependency on python3* without :any.
 * A Python module.

Helmut