I think that there are two distinct problems here.

First, It appears that the problem has to do with etch-backports being
in my sources.list, and apt-show-versions not knowing how to distinguish
between the release 'etch-backports' and the release 'etch'.

It appears as if apt-show-versions looks through the Packages-files list
from the cache to get the different potential Releases files to look
through:

DB<11> 
main::(/usr/bin/apt-show-versions:180):
180:    foreach (@files) {
DB<11> 
main::(/usr/bin/apt-show-versions:181):
181:        my $release = $_;
DB<11> print @files
/var/lib/apt/lists/macaw.riseup.net:9999_backports_dists_etch-backports_main_binary-i386_Packages/var/lib/apt/lists/macaw.riseup.net:9999_debian_dists_etch_main_binary-i386_Packages/var/lib/apt/lists/macaw.riseup.net:9999_debian_dists_etch_contrib_binary-i386_Packages/var/lib/apt/lists/macaw.riseup.net:9999_debian_dists_etch_non-free_binary-i386_Packages/var/lib/apt/lists/macaw.riseup.net:9999_security_dists_etch_updates_main_binary-i386_Packages

It then steps through those @files and tries to pick the Release files
out of there, and in my case, finds the etch-backports one first, so it
begins to process that, it looks in there for a regexp matching known
releases and happens to find 'etch' in there, and decides thats the etch
release (when it is not, its actually the backports release):

DB<14> print $release
/var/lib/apt/lists/macaw.riseup.net:9999_backports_dists_etch-backports_main_binary-i386_Release
DB<17> s
main::(/usr/bin/apt-show-versions:185):
185:        $archiv = `fgrep -s Archive $release` or
186:                $archiv = `fgrep -s Suite $release` or
187:                        ($release 
=~/(potato|woody|sarge|etch|lenny|sid|stable|testing|unstable|experimental)/
and $archiv = $1) or
188:          $archiv = "unknown";
DB<17> s
main::(/usr/bin/apt-show-versions:190):
190:        $archiv =~ s/Archive: //;
DB<17> print $archiv 
etch
DB<18> 

The second problem seems to be that the list of @files that is generated
is a list of *_Packages files, but you need to look through *_Release
files for the Archive/Suite information. You do that by taking the list
of @files, and doing a simple regexp:

foreach (@files) {
    my $release = $_;
    $release =~ s/Packages/Release/;

and then looking through that. The problem is you have to get to this
actual file:

macaw.riseup.net:9999_security_dists_etch_updates_Release

by doing that search and replace on the file:

macaw.riseup.net:9999_security_dists_etch_updates_main_binary-i386_Packages

Which wont get you anywhere, because that results in the $release being
set to:

macaw.riseup.net:9999_security_dists_etch_updates_main_binary-i386_Release

Micah



Attachment: signature.asc
Description: Digital signature

Reply via email to