]> 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>
Wed, 29 Oct 2008 12:50:24 +0000 (13:50 +0100)
suites_cmp('foo', 'bar') should be semantically similar to
'foo' cmp 'bar', not inversed.

lib/Deb/Versions.pm

index 078bc520be5b34ca343cc98bc0fbc3bd49657600..606f75301335ec332d77943dd2a963d67114ddd8 100644 (file)
@@ -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 {