]> git.deb.at Git - deb/packages.git/commitdiff
Some fixes to archive handling
authorFrank Lichtenheld <frank@lichtenheld.de>
Fri, 24 Feb 2006 00:36:27 +0000 (00:36 +0000)
committerFrank Lichtenheld <frank@lichtenheld.de>
Fri, 24 Feb 2006 00:36:27 +0000 (00:36 +0000)
bin/parse-packages
lib/Packages/DoSearch.pm
lib/Packages/Page.pm

index ca77fbc7c66b86e1f0666c9eef54242d44a7f849..ac5bd2c882ee29a61a1c75bdb926e6b9f6707445 100755 (executable)
@@ -121,14 +121,14 @@ for my $suite (@SUITES) {
                $priorities{$suite}{$data{priority}}++;
                my $pkgitem = "$archive $suite $data{'architecture'} ".
                        "$section $subsection $data{'priority'} $data{'version'} $sdescr\0";
-               my $previtem = $packages_small{$data{'package'}}{$suite}{$data{'architecture'}}
-                   || $pkgitem;
+               my $previtem = ($packages_small{$data{'package'}}{$suite}{$data{'architecture'}}
+                   ||= $pkgitem);
                $packages_small{$data{'package'}}{$suite}{$data{'architecture'}} = $pkgitem
-                   if version_cmp($data{'version'}, (split /\s/o, $previtem)[6]) >= 0;
-               $previtem = $packages_small{$data{'package'}}{$suite}{'any'}
-                   || $pkgitem;
+                   if version_cmp($data{'version'}, (split /\s/o, $previtem)[6]) > 0;
+               $previtem = ($packages_small{$data{'package'}}{$suite}{'any'}
+                   ||= $pkgitem);
                $packages_small{$data{'package'}}{$suite}{'any'} = $pkgitem
-                   if version_cmp($data{'version'}, (split /\s/o, $previtem)[6]) >= 0;
+                   if version_cmp($data{'version'}, (split /\s/o, $previtem)[6]) > 0;
                $sources_packages{$src} .=
                        "$archive $suite $data{'package'} $data{'version'} $data{'architecture'}\000";
                $data{archive} = $archive;
index 866bbc08f6169d1a1fe7453c1c3c1293550deff9..0ff2e9b7c50231a6380fe5a4deaef6328b78b18c 100644 (file)
@@ -172,7 +172,7 @@ sub do_search {
                    $subsect{$pkg}{$suite}{$version} = $subsection;
                    $sect{$pkg}{$suite}{$version} = $section
                        unless $section eq 'main';
-                   $archives{$pkg}{$suite}{$version} = $archive;
+                   $archives{$pkg}{$suite}{$version} ||= $archive;
                    
                    $desc{$pkg}{$suite}{$version} = $desc;
                } else {
index 417c97ef68f8baf90d41fc2806333abdfe9ab2ed..3eb31985843d04af7c69ad3f45e87656424ab0ab 100644 (file)
@@ -134,10 +134,6 @@ sub merge_package {
        foreach my $key (@TAKE_NEWEST) {
            $self->{data}{$key} = $data->{$key};
        }
-    } elsif (($cmp == 0) &&
-            $self->{data}{archive} ne 'us') {
-       #FIXME crude hack to prefer us archive over others
-       $self->{data}{archive} = $data->{archive};
     }
     debug( "is_newest= ".($is_newest||0), 3 ) if DEBUG;
     if (!$self->{versions}{$data->{architecture}}