From: Frank Lichtenheld Date: Mon, 16 Jun 2008 18:40:28 +0000 (+0200) Subject: Packages::DoSearch: Fix handling of security source versions X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=340cca0c1e57ee94c42ee43eaa33d8577f1a903f;p=deb%2Fpackages.git Packages::DoSearch: Fix handling of security source versions The test that ensured that the newest version would always be taken, (which e.g. in the case of testing-security isn't always the security version), was partly broken. Reported by Michael Banck. --- diff --git a/lib/Packages/DoSearch.pm b/lib/Packages/DoSearch.pm index 4d86d51..efefa97 100644 --- a/lib/Packages/DoSearch.pm +++ b/lib/Packages/DoSearch.pm @@ -131,8 +131,7 @@ sub do_search { $real_archive = $archive; $archive = 'us'; } - if (($real_archive eq $archive) && - $pkgs{$pkg}{$suite}{$archive} && + if ($pkgs{$pkg}{$suite}{$archive} && (version_cmp( $pkgs{$pkg}{$suite}{$archive}, $version ) >= 0)) { next; }