Stefano Rivera dixit: >Hi Thorsten (2021.07.15_12:27:59_-0400) >> During crossgrading or when installing multiple versions of python3-libxml2 >> they fail to configure because of a bug in the postinst script: > >I can't reproduce this, apt won't let me install multiple architectures >of python3-libxml2 concurrently, due to dependencies.
Hmm, indeed, Multi-Arch: allowed is not coïnstallable according to https://wiki.ubuntu.com/MultiarchSpec but dpkg does allow me to install (though not configure) them during crossgrading. So perhaps this is a crossgrading-only issue, as apt orders the installations and removals to not trigger this. (Unsure if it can be triggered by installing with dpkg, without apt.) Here’s a recipe: first prepare… $ sudo cowbuilder --login # dpkg --add-architecture i386 # apt-get update # apt-get install python3-libxml2:i386 # so the .deb files exist # apt-get install python3-libxml2:amd64 # will remove the i386 ones # cd /var/cache/apt/archives The “apt-get install python3-libxml2:i386” is not strictly needed here, but it installs all the :i386 dependencies we need and downloads the .deb files in one go. (pbuild24310-sid/amd64)root@tglase:/var/cache/apt/archives# dpkg -i python3.9-minimal_3.9.2-1_i386.deb python3.9_3.9.2-1_i386.deb python3-minimal_3.9.2-3_i386.deb python3_3.9.2-3_i386.deb python3-libxml2_2.9.10+dfsg-6.7_i386.deb (Reading database ... 14666 files and directories currently installed.) Preparing to unpack python3.9-minimal_3.9.2-1_i386.deb ... Unpacking python3.9-minimal:i386 (3.9.2-1) over (3.9.2-1) ... Preparing to unpack python3.9_3.9.2-1_i386.deb ... Unpacking python3.9:i386 (3.9.2-1) over (3.9.2-1) ... Preparing to unpack python3-minimal_3.9.2-3_i386.deb ... Unpacking python3-minimal:i386 (3.9.2-3) over (3.9.2-3) ... Preparing to unpack python3_3.9.2-3_i386.deb ... ERROR: ld.so: object '/usr/lib/cowdancer/libcowdancer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored. Unpacking python3:i386 (3.9.2-3) over (3.9.2-3) ... Selecting previously unselected package python3-libxml2:i386. Preparing to unpack python3-libxml2_2.9.10+dfsg-6.7_i386.deb ... Unpacking python3-libxml2:i386 (2.9.10+dfsg-6.7) ... Setting up python3.9-minimal:i386 (3.9.2-1) ... ERROR: ld.so: object '/usr/lib/cowdancer/libcowdancer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored. Setting up python3.9:i386 (3.9.2-1) ... ERROR: ld.so: object '/usr/lib/cowdancer/libcowdancer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored. Setting up python3-minimal:i386 (3.9.2-3) ... ERROR: ld.so: object '/usr/lib/cowdancer/libcowdancer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored. ERROR: ld.so: object '/usr/lib/cowdancer/libcowdancer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored. Setting up python3:i386 (3.9.2-3) ... ERROR: ld.so: object '/usr/lib/cowdancer/libcowdancer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored. ERROR: ld.so: object '/usr/lib/cowdancer/libcowdancer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored. Setting up python3-libxml2:i386 (2.9.10+dfsg-6.7) ... ERROR: ld.so: object '/usr/lib/cowdancer/libcowdancer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored. ERROR: ld.so: object '/usr/lib/cowdancer/libcowdancer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored. dpkg-query: error: --listfiles needs a valid package name but 'python3-libxml2' is not: ambiguous package name 'python3-libxml2' with more than one installed instance Use --help for help about querying packages. Traceback (most recent call last): File "/usr/bin/py3compile", line 319, in <module> main() File "/usr/bin/py3compile", line 298, in main compile(files, versions, File "/usr/bin/py3compile", line 183, in compile for fn, versions_to_compile in filter_files(files, e_patterns, versions): File "/usr/bin/py3compile", line 128, in filter_files for fpath in files: File "/usr/share/python3/debpython/files.py", line 71, in filter_public for fn in files: File "/usr/share/python3/debpython/files.py", line 53, in from_package raise Exception("cannot get content of %s" % package_name) Exception: cannot get content of python3-libxml2 dpkg: error processing package python3-libxml2:i386 (--install): installed python3-libxml2:i386 package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: python3-libxml2:i386 I guess this is rare during normal operation, but we don’t prescribe use of apt anywhere and dpkg can indeed trigger it, and this is the actually normal case when crossgrading. The fix is really easy, dh_python3 must arch-qualify the py3compile (and pypy3compile, I guess) line it inserts if the package is not arch:any. For it to become effective, all packages with the code in their maintainer scripts need to be rebuilt, which… is probably not feasible right now. I did not inspect the other maintainer script snippets, but I think python3-tk (and possibly others) need to adapt their custom code as well. bye, //mirabilos -- Gestern Nacht ist mein IRC-Netzwerk explodiert. Ich hatte nicht damit gerechnet, darum bin ich blutverschmiert… wer konnte ahnen, daß SIE so reagier’n… gestern Nacht ist mein IRC-Netzwerk explodiert~~~ (as of 2021-06-15 The MirOS Project temporarily reconvenes on OFTC)