Hi Nilesh and others,
I ran into an entire problem category that seems worth solving using
lintian. There are situations where apt and dpkg disagree about whether
a dependency is satisfiable. This is rare. One such case is #770301.
The disagreement is about how Breaks or Conflicts against the package
itself are to be interpreted. The problem only arises when the package
declares Multi-Arch: same. While apt generally restricts Breaks and
Conflicts against itself to the same architecture, dpkg treats them as
generic (and the bug at hand is about doing so inconsistently). So we
end up in situations where apt finds an installation set valid and when
it hands that off to dpkg, it bails.
I argue that independent of any convergence of apt and dpkg about this,
we do not want packages to excercise this behavior. Very likely, the
Multi-Arch capability cannot be used in such situations.
A relatively simply way of avoiding the problem is dropping the
Multi-Arch annotation. That often is not ideal.
Another way of dealing with it is qualifying Breaks or Replaces. Rather
than "Breaks: foo", we might use "Breaks: foo:${DEB_HOST_ARCH}". Note
that it depends on the reason for why there are Breaks/Conflicts whether
this is the right thing to do. If files have been moved between packages
and those files reside on architecture-independent paths (e.g.
documentation), this qualifying is not correct.
When dealing with overlapping files, the situation commonly is
temporary. There is an old version of the package with the old name and
a new version of the package with the changed name. For compatibility,
the package is additionally provided. This is a variant of #1036712.
So while the solution to the problem is not exactly obvious and we
likely need a longer descriptive text here, the detection should be
relatively straight forward. For any binary package carrying
"Multi-Arch: same", we may iterate over Breaks and Conflicts and see
whether any of them match the package itself or any of its Provides.
This matching must take versions into account.
I implemented a vaguely similar check (undermatching versions) in SQL:
SELECT DISTINCT p.name FROM package AS p JOIN relation AS rp ON p.id = rp.pid JOIN relation AS rb ON p.id = rb.pid JOIN package_membership AS m ON p.id = m.pid JOIN component AS c ON c.id = m.cid JOIN release AS r ON r.id = c.rid WHERE p.multiarch = 'same' AND rp.kind = 'provides' AND rb.kind IN ('breaks', 'conflicts') AND rp.value = rb.value AND r.suite = 'unstable';
Result:
appmenu-gtk3-module
coinor-libcoinutils-dev
coinor-libcoinutils3v5
dde-qtplatform-plugins
flite1-dev
gir1.2-ggit-1.0
gir1.2-totemplparser-1.0
intel-vc-intrinsics-dev
itcl3-dev
itk3-dev
khronos-opencl-icd-libopencl1
khronos-opencl-icd-loader-dev
libacl1-dev
libaiksaurus-1.2-dev
libantlr3c-antlrdbg-3.4-0
libapertium-lex-tools1
libapertium3
libapophenia2-dev
libapophenia2t64
libasound2-plugins
libattr1-dev
libaudio-dev
libbliss2
libblitz0-dev
libblitz0t64
libbt0
libc6
libcg3-1
libchipcard6t64
libcli1.10t64
libcrypt-dev
libctapimkt1-dev
libcupti12
libdbus-cpp-dev
libdebconfclient0-dev
libdebian-installer4-dev
libdtk6core6
libdtk6log0
libdv4-dev
libeantic3
libeb16-dev
libfishsound1-dev
libfltk1.3-dev
libfltk1.4-dev
libfm-qt6-17
libfreecontact-dev
libgcrypt20-dev
libgenders0-dev
libglewmx-dev
libglu1-mesa
libglw1-mesa-dev
libgmp-dev
libgooglepinyin0-dev
libgpm-dev
libgsl-dbg
libgwyddion-dev
libhamlib-dev
libhfstospell11
libid3-3.8.3-dev
libigdfcl1
libimath-dev
libinotifytools0-dev
libjack-jackd2-0
libjack-jackd2-dev
libjack0
libjbig2dec0-dev
libjuman4t64
libkakasi2-dev
liblcms2-dev
libllvmspirvlib-21-dev
liblqr-1-0-dev
libltdl-dev
liblttoolbox3
liblua5.1-0-dev
libmate-panel-applet-4-1
libmatheval-dev
libmd4c-html-dev
libmpfi0
libncurses-dev
libnet1-dev
libnewmat10-dev
libnfsidmap1
libnormaliz3
libnvidia-eglcore
libnvidia-glcore
libnvidia-glvkspirv
libnvidia-gpucomp
libnvidia-pkcs11-openssl3
libnvidia-rtcore
libnvidia-tesla-450-eglcore
libnvidia-tesla-450-glcore
libnvidia-tesla-450-glvkspirv
libnvidia-tesla-535-eglcore
libnvidia-tesla-535-glcore
libnvidia-tesla-535-glvkspirv
libnvidia-tesla-535-pkcs11-openssl3
libnvidia-tesla-535-rtcore
libnvidia-tesla-550-eglcore
libnvidia-tesla-550-glcore
libnvidia-tesla-550-glvkspirv
libnvidia-tesla-550-gpucomp
libnvidia-tesla-550-pkcs11-openssl3
libnvidia-tesla-550-rtcore
libodil-dev
libodil0t64
libopencamlib-2023.01
libopencl-clang-21-dev
libopencl-clang-22-dev
libopenh264-cisco8
libopenni-sensor-pointclouds-dev
libopenni-sensor-primesense-dev
liboss4-salsa-asound2
libpam-modules
libpam-p11
libphysfs1
libpinyin15-dev
libpkcs11-helper1-dev
libplfit0
libppl-dev
libprimecount-dev
libprimecount8
librasqal3-dev
libreadline-dev
libsamplerate0-dev
libscscp1
libscscp1-dev
libselinux1-dev
libsfst1
libsingular4-dev
libslang2-modules
libsndfile1-dev
libsnp-sites1-dev
libsollya8
libstdgpu-cuda-dev
libstdgpu-hip-dev
libstdgpu-openmp-dev
libstorj-dev
libtasn1-6-dev
libtestu01-0-dev
libtestu01-0t64
libturbojpeg0-dev
libudisks2-qt6-1
libunicap2-dev
libusermetricsinput-dev
libusermetricsoutput-dev
libvectorscan-dev
libvectorscan5
libxcb-sync-dev
libyuv0
libzmq3-dev
nvidia-libopencl1
ocl-icd-libopencl1
ocl-icd-opencl-dev
phonon4qt5-backend-null
phonon4qt6-backend-null
qml-module-buteo-syncfw
qml-module-lomiri-components
qml-module-lomiri-components-labs
qml-module-lomiri-thumbnailer
qml-module-usermetrics
scim-gtk-immodule
supercollider-dev
tcl-itcl4-dev
tcl-memchan
tcl-memchan-dev
tcl-tclex
tcl-tclreadline
tcl-trf
tcl-trf-dev
tcl-udp
tcl-vfs
tk-itk4-dev
tk-tktray
Note that most of the t64 uploads got this right by adding a version
constraint. The rare remaining ones should likely add one.
I did not yet look into writing a patch (and also think #1036712 should
be applied first to avoid hunk conflicts). What do you think?
Helmut