]> git.deb.at Git - deb/packages.git/commitdiff
Deb::Versions: Logic of suites_cmp was backwards
authorFrank Lichtenheld <frank@lichtenheld.de>
Wed, 29 Oct 2008 12:50:24 +0000 (13:50 +0100)
committerFrank Lichtenheld <frank@lichtenheld.de>
Sun, 2 Nov 2008 23:31:57 +0000 (00:31 +0100)
suites_cmp('foo', 'bar') should be semantically similar to
'foo' cmp 'bar', not inversed.
(cherry picked from commit 06f373183a382a922587f4b9c14c33967aaa3959)

lib/Deb/Versions.pm

index d8d8282a3fcd39d3324dc5536632ac203d310668..792a86373fbcbb7bfec63d1201c25b668709baaf 100644 (file)
@@ -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 {