Bug#913913: apt-cache policy does not display all (security and updates) APT repos in buster
Package: apt
Version: 1.8.0~alpha2
Severity: normal
NB1 Reporting from my laptop whenever original issue discovered within
minimalistic Singularity image, and then replicated within docker
environments and demonstrated below
NB2 Loosely relates to a good old https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=301464
pointing to the fact that documentation of apt-cache policy output/behavior is scarse
NB3 Originally reported/file at https://github.com/neurodebian/neurodebian/issues/46#issuecomment-439503153
Even though there are 3 APT sources available, apt-cache policy in buster
reports only a single one ignoring security and updates:
$> docker run -it --rm debian:buster
Unable to find image 'debian:buster' locally
buster: Pulling from library/debian
bac5159b230a: Pull complete
Digest: sha256:8d601936efd739539811324e431a559782740a96b0e2896a8740245e1aad8db2
Status: Downloaded newer image for debian:buster
root@f8b49c0582c3:/# apt-get update
Get:1 http://security-cdn.debian.org/debian-security buster/updates InRelease [38.3 kB]
Get:2 http://cdn-fastly.deb.debian.org/debian buster InRelease [150 kB]
Get:3 http://cdn-fastly.deb.debian.org/debian buster-updates InRelease [47.6 kB]
Get:4 http://cdn-fastly.deb.debian.org/debian buster/main amd64 Packages [7743 kB]
Fetched 7978 kB in 3s (2661 kB/s)
Reading package lists... Done
root@f8b49c0582c3:/# apt-cache policy
Package files:
100 /var/lib/dpkg/status
release a=now
500 http://deb.debian.org/debian buster/main amd64 Packages
release o=Debian,a=testing,n=buster,l=Debian,c=main,b=amd64
origin deb.debian.org
Pinned packages:
root@f8b49c0582c3:/# cat /etc/apt/sources.list
deb http://deb.debian.org/debian buster main
deb http://security.debian.org/debian-security buster/updates main
deb http://deb.debian.org/debian buster-updates main
In the released stretch it seems to be behaving better and displays all
3:
$> docker run -it --rm debian:stretch
root@5bf72a002f55:/# cat /etc/apt/sources.list
deb http://httpredir.debian.org/debian stretch main
deb http://httpredir.debian.org/debian stretch-updates main
deb http://security.debian.org stretch/updates main
root@5bf72a002f55:/# apt-get update
Get:1 http://security.debian.org stretch/updates InRelease [94.3 kB]
Ign http://httpredir.debian.org stretch InRelease
Get:2 http://security.debian.org stretch/updates/main amd64 Packages [572 kB]
Get:3 http://httpredir.debian.org stretch-updates InRelease [91.0 kB]
Get:4 http://httpredir.debian.org stretch Release.gpg [2434 B]
Get:5 http://httpredir.debian.org stretch-updates/main amd64 Packages [5476 B]
Get:6 http://httpredir.debian.org stretch Release [118 kB]
Get:7 http://httpredir.debian.org stretch/main amd64 Packages [9488 kB]
Fetched 10.4 MB in 2s (5171 kB/s)
Reading package lists... Done
W: There is no public key available for the following key IDs:
EF0F382A1A7B6500
root@5bf72a002f55:/# apt-cache policy
Package files:
100 /var/lib/dpkg/status
release a=now
500 http://security.debian.org/ stretch/updates/main amd64 Packages
release v=9,o=Debian,a=stable,n=stretch,l=Debian-Security,c=main
origin security.debian.org
500 http://httpredir.debian.org/debian/ stretch-updates/main amd64 Packages
release o=Debian,a=stable-updates,n=stretch-updates,l=Debian,c=main
origin httpredir.debian.org
500 http://httpredir.debian.org/debian/ stretch/main amd64 Packages
release v=9.6,o=Debian,a=stable,n=stretch,l=Debian,c=main
origin httpredir.debian.org
Pinned packages:
root@5bf72a002f55:/# apt-cache policy apt
apt:
Installed: 1.0.10.2
Candidate: 1.4.8
Version table:
1.4.8 0
500 http://httpredir.debian.org/debian/ stretch/main amd64 Packages
*** 1.0.10.2 0
100 /var/lib/dpkg/status
I wonder if there is any workaround, i.e. any other way to figure out active
APT sources to be used.
-- System Information:
Debian Release: buster/sid
APT prefers unstable
APT policy: (600, 'unstable'), (300, 'experimental'), (100, 'unstable-debug'), (100, 'stable')
Architecture: amd64 (x86_64)
-- debconf-show failed
Reply to: