Package: dpkg
Version: 1.18.7
Severity: important
Control: block 688295 with -1

Hi Guillem,

is is a followup (or reiteration) of #801958.

on an amd64 host with an i386 and an amd64 chroot I get inconsistent
output from dpkg-query (and dpkg-divert):


$ dpkg-query --admindir $amd64chroot/var/lib/dpkg --show 
--showformat='${binary:Package} ${Version}\n' firefox-esr
firefox-esr 45.1.1esr-1+b1
*****      ^

$ dpkg-query --admindir $i386chroot/var/lib/dpkg --show 
--showformat='${binary:Package} ${Version}\n' firefox-esr
firefox-esr:i386 45.1.1esr-1+b1
*****      ^^^^^^

$ dpkg-divert --list --admindir $amd64chroot/var/lib/dpkg firefox-esr
diversion of /usr/bin/firefox to /usr/bin/firefox.real by firefox-esr

$ dpkg-divert --list --admindir $i386chroot/var/lib/dpkg firefox-esr
diversion of /usr/bin/firefox to /usr/bin/firefox.real by firefox-esr


debsums uses dpkg-query to enumerate packages and dpkg-divert to
enumerate diversions. piuparts uses debsums -r $chroot which
incorrectly reports missing diverted files if the host and chroot
architectures are different (since the diversion is owned by a
package not listed by dpkg-query). This is #688295.


In https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=801958#12 you
quoted d658a8e:

    libdpkg: Consider foreign packages ambiguous in need of arch-qualifier

    With cross-arch dependencies, foreign arch-qualified dependencies and
    foreign packages become really ambiguous in error messages, but also
    on the usual progress reporting.
...

except that there are, IMHO, no foreign packages involved here.
The only "foreign" relationship I see is between the architecture of the
dpkg running on the host system and the architecture in the chroot given
by the --admindir. But that shouldn't influence the output. Inside the
chroots, the packages are native (there is not even a foreign
architecture enabled). The foreignness of a package should be computed
relative to its corresponding --admindir, not to the host architecture.


Andreas

Reply via email to