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/?p=deb%2Fpackages.git;a=commitdiff_plain;h=06f373183a382a922587f4b9c14c33967aaa3959 Deb::Versions: Logic of suites_cmp was backwards suites_cmp('foo', 'bar') should be semantically similar to 'foo' cmp 'bar', not inversed. --- diff --git a/lib/Deb/Versions.pm b/lib/Deb/Versions.pm index 078bc52..606f753 100644 --- a/lib/Deb/Versions.pm +++ b/lib/Deb/Versions.pm @@ -177,11 +177,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 {