From: Frank Lichtenheld Date: Wed, 29 Oct 2008 12:50:24 +0000 (+0100) Subject: Deb::Versions: Logic of suites_cmp was backwards X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=85a0d250766684cd29cd0d3599c9a21bfdf3f33e;p=deb%2Fpackages.git Deb::Versions: Logic of suites_cmp was backwards suites_cmp('foo', 'bar') should be semantically similar to 'foo' cmp 'bar', not inversed. (cherry picked from commit 06f373183a382a922587f4b9c14c33967aaa3959) --- diff --git a/lib/Deb/Versions.pm b/lib/Deb/Versions.pm index d8d8282..792a863 100644 --- a/lib/Deb/Versions.pm +++ b/lib/Deb/Versions.pm @@ -176,11 +176,11 @@ sub suites_cmp { $cmp_b = $suites_sort{$1} - $archive_sort{$2} if $s_b =~ m;^(.+?)[/-](.*)$;o; } - return ($cmp_a <=> $cmp_b); + return ($cmp_b <=> $cmp_a); } sub suites_sort { - return sort { suites_cmp( $b, $a ) } @_; + return sort { suites_cmp( $a, $b ) } @_; } sub priority_cmp {