Bug#307942: apt-get autoclean removes valid cache members
Hi,
>From my experiment, I think I have already found the problem here.
In the source file "./apt-pkg/clean.cc", I try to insert the debug code like in the following,
cerr << "pkgArchiveCleaner::Go(): Pkg==" << Pkg << endl;
cerr << "pkgArchiveCleaner::Go(): IsFetchable==" << IsFetchable << endl;
cerr << "pkgArchiveCleaner::Go(): Ver==" << Ver << endl;
cerr << "pkgArchiveCleaner::Go(): V.VerStr()==" << V.VerStr() << endl;
// See if this verison matches the file
if (IsFetchable == true && Ver == V.VerStr())
break;
The output that illustrate the problem is,
<--cut-->
pkgArchiveCleaner::Go(): Pkg==khelpcenter
pkgArchiveCleaner::Go(): IsFetchable==1
pkgArchiveCleaner::Go(): Ver==3.2.2-1ubuntu3.1
pkgArchiveCleaner::Go(): V.VerStr()==4:3.2.2-1ubuntu3.1
<--cut-->
The problem is that the "Ver" value ("3.2.2-1ubuntu3.1") which is extracted
from the file in cache "/var/cache/apt/archives/khelpcenter_3.2.2-1ubuntu3.1_i386.deb",
is not equal to "V.VerStr()" which has "4:" as an additional prefix.
For more information,
$ apt-cache policy khelpcenter khelpcenter: Installed: 4:3.2.2-1ubuntu3.1
Candidate: 4:3.2.2-1ubuntu3.1
Version Table:
4:3.4.3-0ubuntu6 0
600 http://downloads.planetmirror.com breezy-updates/main Packages
4:3.4.3-0ubuntu4 0
600 http://downloads.planetmirror.com breezy/main Packages
4:3.4.0-0ubuntu18.2 0
700 http://downloads.planetmirror.com hoary-updates/main Packages
4:3.4.0-0ubuntu18.1 0
700 http://downloads.planetmirror.com hoary-security/main Packages
4:3.4.0-0ubuntu18 0
700 http://downloads.planetmirror.com hoary/main Packages
4:3.3.2-1sarge1 0
500 http://ftp.debian.org sarge/main Packages
500 http://downloads.planetmirror.com sarge/updates/main Packages
*** 4:3.2.2-1ubuntu3.1 0
800 http://downloads.planetmirror.com warty-security/universe Packages
100 /var/lib/dpkg/status
4:3.2.2-1ubuntu2 0
800 http://downloads.planetmirror.com warty/universe Packages
Also, according to the information from the original reporter of this bug, the
"akode" package has the same problem that its version is prefixed by "4:", as
shown below,
[apt-get_-s_autoclean.txt]
Del akode 3.3.2-1 [193kB]
Del alien 8.51 [115kB]
<--cut-->
[installed-packages.txt]
akode 3.3.2-1
alien 8.52
<--cut-->
[apt-cache-policy.txt]
akode:
Installed: 4:3.3.2-1
Candidate: 4:3.3.2-1
Version Table:
*** 4:3.3.2-1 0
990 ftp://ftp.de.debian.org sarge/main Packages
500 ftp://ftp.de.debian.org unstable/main Packages
100 /var/lib/dpkg/status
<--cut-->
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Reply to: