Package: apt-show-versions Version: 0.16 Severity: normal Tags: patch apt-show-versions builds its database about release files by using a substr comparison against its lists of valid releases. This is somewhat indeterministic and, in my tests, results in the release information and information about packages associated with this release, to be overwritten. Of particular note with my set of packages are packages from the squeeze-updates suite (they show up as "newer than version in archive").
I attach a patch fixing this problem, which attempts to find the most specific substring match. Since this is a regression from lenny (if only in circumstance rather than code, since the squeeze-updates suite is new), I would be pleased to see this fixed in a point release. Cheers, Dominic. -- Dominic Hargreaves, Systems Development and Support Team Computing Services, University of Oxford
--- /usr/bin/apt-show-versions 2009-06-19 16:48:49.000000000 +0100
+++ bin/apt-show-versions.clean 2011-04-18 16:54:55.000000000 +0100
@@ -563,7 +563,8 @@
return $pkgfile if ($releasenames{$pkgfile});
$pkgfile =~ s{.*/}{};
return undef if ($pkgfile eq 'status');
- foreach (keys %releasenames) {
+ # Sort according to length so we make the most specfic match
+ foreach (sort { length($b) <=> length($a) } keys %releasenames) {
return $_ if ($_ eq substr($pkgfile, 0, length($_)));
}
# As package file has no release file, create a fallback %releasenames
signature.asc
Description: Digital signature

