After getting some help in IRC, I guess the problem boils down to:
1. All architectures provide the t64 variant (libmagic1t64).
2. Some architectures no longer provide the old variant (libmagic1), for
example armhf.
3. Therefore, the install dependency of python3-magic must be the t64 variant.
and derive the name of the shared library package from the
libmagic-dev package.
Now replacing one hardcoded binary library dependency with a different
one is not quite the brightest move as this will introduce work should
the libmagic ABI ever change (hasn't happened in 20 years but still).
So it was nicer to do this dynamically during build. That step however
is optional.
Do you have an idea, an existing solution how to do that?
So far I found two ways, and dislike both:
* Derive from apt-cache:
override_dh_gencontrol:
perl -MDebian::Debhelper::Dh_Lib -e \
'addsubstvar ("python3-magic", "misc:Depends", $$ARGV[0])' \
"$$(apt-cache show libmagic-dev | awk '($$1=="Depends:"){print $$2}' | head -n 1)"
dh_gencontrol $@
Querying the apt database from inside a package build feels like a layer violation.
* Abuse dpkg-shlibdeps:
override_dh_gencontrol:
dpkg-shlibdeps -e /usr/bin/file -Tdebian/python3-magic.substvars
dh_gencontrol $@
(Some tweaks to debian/control needed as well.)
This also introduces an install dependency on libc6, and my gut feeling
tells me this was the point to make python3-magic arch:any.
So, is all this worth the efforts? FWIW, I maintain the libmagic
package as well, so being lazy now will just hurt me later.
Christoph
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEWXMI+726A12MfJXdxCxY61kUkv0FAmXzYEkACgkQxCxY61kU kv1eBA/9FrtAS/DcgiqvJ4p49Zk6jLEwluAaEWriKbNoRE19pmZq6ByVUuuGFKOQ 8EjcgtCkVsErggKSYJ6aXFpoJ3VPq+NR+ilp97YMljQVNhYchbU4xX12vcLDyxrw PKzu1k2fqnrwz/1JK/pxwIx1n3Uq1m+Wv/xD6rzG91CCVb7c0lgpetMK/5UIXxNc nCimZjwgsoQDZvQwK0Q69RLLF9+uI+YxAYG05Y299IsV8VvLK9rTGupJ1/L3cBxE IAIaZMLA2W097gPcmIJ94QZXH0xIQydiILyeV1LbcRgI6Dp0hQ+R5o/9ypVan1yH 9CnsIN6k6Vj4iWHSjs5huzFlH4EUk5spqa/ABW/U1mun8o7WBegkQ6cThA1mZQx4 7vYU4gKHpw3c2C3qid0ZOvGfbb4Ivu/RVBn1RHgtMHdRPR19WgW1K+9kxCtju3aI cDKL+JG5mdaUXOjOLdtQIWucEr4SYSrh9lUarCMR0HJym5BboqRT9BosQ4eiRSKA cWjKu18beASFUJBp5sQZ1suWzptDj0lgabXjhHNIa7/ywYNmH0Wbdse9f/n7DK0p yOesHp8xeZOixUH8HFylL9mZTUUIMBmH/00lptCYN5BU/kqSg0wgRFRNHQYcRKji xrhj2cZK05otCW8QWLqWMRXKlCJDWDeWYMYsPUEpWbAXMMwnBig=
=RvtM
-----END PGP SIGNATURE-----
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)