On Wed, 08 May 2024 at 23:24:57 +0200, Christian Klein wrote: > I install both the i386 and amd64 version for multi-arch support. > > With the newest versions, a dependency to python was added. > > Unfortunately, the package has two dependencies for python: > "python3:any" > and > "python3 | qemu-user | qemu-user-static". > > While python3:any is satisfied by the amd64 version of python, the second the > second dependency resolves to "python3:i386", which is not co-installable > with > python:amd64. > So, I now have to install qemu-user as dependency, which comes with a few > other > heavy dependencies. Is this really needed, and how does that help at all?
Yes this is really needed, and it was not added just to spite you. In general, qemu is required to be able to run GObject-Introspection tools on cross-compiling architectures (which were packaged separately in older versions of GLib, but are part of GLib itself in 2.80.x). Some of the GObject-Introspection tools are required to be of the same architecture as the typelib they are handling, and using an amd64 tool to load a non-amd64 typelib will cause bugs. The dependency on python3 | qemu-user is to avoid needing to pull in qemu-user in the common case where only one architecture is relevant (libglib2.0-dev:amd64 on amd64). For the special case of i386 on an amd64 system, qemu is usually not actually needed because amd64 systems can nearly always run i386 binaries directly (although I believe there are kernel configurations that will not allow that), but it's not obvious how to express that conditional dependency in apt syntax. Tested patches welcome, but my understanding is that all the obvious ideas like "Depends: python3 | python3:amd64 [i386] | qemu-user | qemu-user-static" are not suitable, because explicit cross-architecture dependencies like that one are not supported by the multiarch specification or the Debian archive software. If someone designs and implements the can-run-arch or cross-exe-wrapper interfaces sketched in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1030223#37 then I believe that would give libglib2.0-dev:i386 a way to be installable on amd64 without needing qemu-user. If you are interested in doing this, please talk to the debian-cross team to make sure that the design is sound. Until something like that happens, I am not aware of a better approach. smcv

