$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;
$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 {
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}}