]> git.deb.at Git - deb/packages.git/blobdiff - lib/Deb/Versions.pm
Initial Polish translation of sections file.
[deb/packages.git] / lib / Deb / Versions.pm
index 35f0cb5d5665e2a20dbc7a5104654f2a10832686..706f017f20c185f25beab1cb6cae6b1d7864622f 100644 (file)
@@ -70,22 +70,6 @@ our @EXPORT = qw( version_cmp version_sort suites_cmp suites_sort );
 
 our $VERSION = v1.0.0;
 
-BEGIN {
-    eval {
-       use AptPkg::Config '$_config';
-       use AptPkg::System '$_system';
-       use AptPkg::Version;
-
-       $_config->init;
-       $_system = $_config->system;
-       my $apt_ver = $_system->versioning;
-       *version_cmp = sub { return $apt_ver->compare(@_) };
-    };
-    unless( *version_cmp ){
-       *version_cmp = \&version_cmp_pp;
-    }
-}
-
 my $re = qr/^(?:(\d+):)?([\w.+:~-]+?)(?:-([\w+.~]+))?$/;
 sub version_cmp_pp {
     return 0 if $_[0] eq $_[1];
@@ -119,6 +103,18 @@ sub version_cmp_pp {
     return $res;
 }
 
+*version_cmp = \&version_cmp_pp;
+eval {
+    require AptPkg::Config;
+    require AptPkg::System;
+    require AptPkg::Version;
+    
+    $AptPkg::Config::_config->init;
+    $AptPkg::System::_system = $AptPkg::Config::_config->system;
+    my $apt_ver = $AptPkg::System::_system->versioning;
+    *version_cmp = sub { return $apt_ver->compare(@_) };
+};
+
 sub version_sort {
     return sort { version_cmp( $b, $a ) } @_;
 }
@@ -169,7 +165,12 @@ sub _lcmp {
     return length( $v1 ) <=> length( $v2 );
 }
 
-our @SUITES_SORT = qw(  woody
+our @SUITES_SORT = qw(  
+                       bo
+                       hamm
+                       slink
+                       potato
+                       woody
                        sarge
                        oldstable
                        etch etch-m68k
@@ -178,7 +179,8 @@ our @SUITES_SORT = qw(  woody
                        testing testing-proposed-updates
                        squeeze
                        sid unstable experimental
-                       warty hoary breezy dapper edgy feisty gutsy hardy intrepid jaunty);
+                       warty hoary breezy dapper edgy feisty gutsy hardy
+                       intrepid jaunty karmic lucid maverick);
 our @ARCHIVE_SORT = qw( non-US security updates volatile backports );
 our @PRIORITY_SORT = qw( required important standard optional extra );
 my $i = 1000;