Bug#158118: apt: doesn't properly handle Release files that show up on already-known distribution
Package: apt
Version: 0.5.4
Severity: normal
Hi!
I am currently experimenting with a local distribution and would like
to work with pinning. During these experiments, I have found a buglet
in apt. Thanks for michaelw for helping to debug this on IRC.
[5/5]haber@paola:~$ cat /etc/apt/sources.list
deb http://debian.toplink-plannet.de/debian/ woody main
deb http://debian.toplink-plannet.de/debian/ tpl/woody main
[6/6]haber@paola:~$ sudo apt-get --quiet update
Hit http://debian.toplink-plannet.de woody/main Packages
Hit http://debian.toplink-plannet.de woody/main Release
Hit http://debian.toplink-plannet.de tpl/woody/main Packages
Ign http://debian.toplink-plannet.de tpl/woody/main Release
Reading Package Lists...
Building Dependency Tree...
[7/7]haber@paola:~$ apt-cache policy
Package Files:
100 /var/lib/dpkg/status
release a=now
500 http://debian.toplink-plannet.de tpl/woody/main Packages
origin debian.toplink-plannet.de
500 http://debian.toplink-plannet.de woody/main Packages
release v=3.0,o=Debian,a=stable,l=Debian,c=main
origin debian.toplink-plannet.de
Pinned Packages:
[8/8]haber@paola:~$ ls -al /var/lib/apt/lists
total 6.3M
drwxr-xr-x 3 root root 4.0k Aug 25 13:01 ./
drwxr-xr-x 3 root root 4.0k Jul 23 13:25 ../
-rw-r--r-- 1 root root 17k Aug 24 21:13 debian.toplink-plannet.de_debian_dists_tpl_woody_main_binary-i386_Packages
-rw-r--r-- 1 root root 6.2M Jul 19 19:33 debian.toplink-plannet.de_debian_dists_woody_main_binary-i386_Packages
-rw-r--r-- 1 root root 93 Jul 19 19:03 debian.toplink-plannet.de_debian_dists_woody_main_binary-i386_Release
-rw-r----- 1 root root 0 Aug 25 13:01 lock
drwxr-xr-x 2 root root 4.0k Aug 25 13:01 partial/
[9/9]haber@paola:~$
Please notice that my local tpl/woody distribution does not have a
Release file. apt handles this properly, ignoring the Release file,
and apt-cache does not show any release info in the policy listing.
Now I put a Release file on the download server. /etc/apt/sources.list
remains unchanged.
[9/9]haber@paola:~$ sudo apt-get --quiet update
Hit http://debian.toplink-plannet.de woody/main Packages
Hit http://debian.toplink-plannet.de woody/main Release
Hit http://debian.toplink-plannet.de tpl/woody/main Packages
Get:1 http://debian.toplink-plannet.de tpl/woody/main Release [79B]
Fetched 79B in 0s (4046B/s)
Reading Package Lists...
Building Dependency Tree...
[10/10]haber@paola:~$ ls -al /var/lib/apt/lists
total 6.3M
drwxr-xr-x 3 root root 4.0k Aug 25 13:02 ./
drwxr-xr-x 3 root root 4.0k Jul 23 13:25 ../
-rw-r--r-- 1 root root 17k Aug 24 21:13 debian.toplink-plannet.de_debian_dists_tpl_woody_main_binary-i386_Packages
-rw-r--r-- 1 root root 79 Aug 25 13:00 debian.toplink-plannet.de_debian_dists_tpl_woody_main_binary-i386_Release
-rw-r--r-- 1 root root 6.2M Jul 19 19:33 debian.toplink-plannet.de_debian_dists_woody_main_binary-i386_Packages
-rw-r--r-- 1 root root 93 Jul 19 19:03 debian.toplink-plannet.de_debian_dists_woody_main_binary-i386_Release
-rw-r----- 1 root root 0 Aug 25 13:02 lock
drwxr-xr-x 2 root root 4.0k Aug 25 13:02 partial/
[11/11]haber@paola:~$ apt-cache policy
Package Files:
100 /var/lib/dpkg/status
release a=now
500 http://debian.toplink-plannet.de tpl/woody/main Packages
origin debian.toplink-plannet.de
500 http://debian.toplink-plannet.de woody/main Packages
release v=3.0,o=Debian,a=stable,l=Debian,c=main
origin debian.toplink-plannet.de
Pinned Packages:
[12/12]haber@paola:~$
This time, apt properly notices that there is a Release file, duly
downloads it and puts it into /var/lib/apt/lists. But apt-cache policy
doesn't seem to care, still not displaying release data for that
distribution.
To put apt back on track, it is necessary to remove tpl/woody from
sources.list, apt-get update, put tpl/woody back again and apt-get
update again. With the Release file unchanged on the download server,
apt-cache policy displays the release data like it should.
Please consider fixing this.
Greetings
Marc
-- System Information
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux paola 2.4.19-paola #1 Wed Aug 7 08:54:32 UTC 2002 i686
Locale: LANG=C, LC_CTYPE=de_DE
Versions of packages apt depends on:
ii libc6 2.2.5-10 GNU C Library: Shared libraries an
ii libstdc++2.10-glibc2.2 1:2.95.4-11 The GNU stdc++ library
Reply to: