X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=bin%2Fparse-packages;h=ac5bd2c882ee29a61a1c75bdb926e6b9f6707445;hb=564f2f93ec21c9210415eb6cfb7eea589b05a5ae;hp=34ac95d7768595056e3766446209363a51161dbe;hpb=8b6cf96e83c44179ff279538a250b21ad936fabe;p=deb%2Fpackages.git diff --git a/bin/parse-packages b/bin/parse-packages index 34ac95d..ac5bd2c 100755 --- a/bin/parse-packages +++ b/bin/parse-packages @@ -78,6 +78,7 @@ for my $suite (@SUITES) { if ($data{'provides'}) { foreach (split /\s*,\s*/, $data{'provides'}) { $virtual_packages{$_}{$suite}{$data{'package'}}++; + $packages_small{$_} ||= {}; } } $package_names{$data{'package'}} = 1; @@ -115,19 +116,19 @@ for my $suite (@SUITES) { $data{'section'} = $section; $data{'subsection'} = $subsection; $data{'priority'} ||= '-'; - $sections{$suite}{$archive}{$section}++; - $subsections{$suite}{$archive}{$subsection}++; - $priorities{$suite}{$archive}{$data{priority}}++; + $sections{$suite}{$section}++; + $subsections{$suite}{$subsection}++; + $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;