Bug#1015794: behaviour of ?archive pattern inconsistent with aptitude
Package: apt
Version: 2.5.1
Severity: normal
Dear Maintainer,
I noticed that the ?archive pattern does not behave the same in apt as in
aptitude.
My system has both unstable and experimental suites enabled (see below
debian.sources).
When I run:
aptitude versions '~i~Aexperimental'
I get a list of those installed package versions that effectively come from
experimental (8 in total on my system, in particular I use GCC 12 by default):
Package cpp:
i A 4:12-20211211-1 experimental 100
Package g++:
i 4:12-20211211-1 experimental 100
…
However, when I run:
apt list '~i~Aexperimental'
I get a list of 297 packages. It seems to include all the installed packages
for which a more recent version exists in experimental, independently of
whether I installed that more recent version or not. For example, the output
contains:
wfrench/unstable,now 1.2.6-1 all [installed,automatic]
wfrench 1.2.6-1 actually comes from unstable, but there is indeed a 1.2.7-1
currently in experimental (which I did not install).
This behaviour seems to contradict the documentation, so I guess it is not
intended (or the documentation should probably be clarified otherwise, and this
be added to the incompatibilites with aptitude).
Thanks for your work,
Sébastien Villemot
-- Package-specific info:
-- (no /etc/apt/preferences present) --
-- (no /etc/apt/preferences.d/* present) --
-- (no /etc/apt/sources.list present) --
-- /etc/apt/sources.list.d/debian.sources --
Types: deb deb-src
URIs: http://deb.debian.org/debian
Suites: unstable experimental
Components: main contrib non-free
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
-- System Information:
Debian Release: bookworm/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 5.18.0-2-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages apt depends on:
ii adduser 3.122
ii debian-archive-keyring 2021.1.1
ii gpgv 2.2.35-3
ii libapt-pkg6.0 2.5.1
ii libc6 2.33-8
ii libgcc-s1 12.1.0-7
ii libgnutls30 3.7.6-2
ii libseccomp2 2.5.4-1
ii libstdc++6 12.1.0-7
ii libsystemd0 251.3-1
Versions of packages apt recommends:
ii ca-certificates 20211016
Versions of packages apt suggests:
ii apt-doc 2.5.1
ii aptitude 0.8.13-4
ii dpkg-dev 1.21.9
ii gnupg 2.2.35-3
ii gnupg2 2.2.35-3
ii powermgmt-base 1.36
ii synaptic 0.91.2
-- no debconf information
Reply to: