X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=bin%2Fparse-packages;h=e069024c7ab1e20a54fb9f17b96ddca62cba7d73;hb=655b2eb3a319370039897127a65666b536af901e;hp=61d6b841676fc644b2ca1dbbe0be31be1130cc9e;hpb=994eceb69bd5a8865a51e00b3cfb1c7a1f03f78e;p=deb%2Fpackages.git diff --git a/bin/parse-packages b/bin/parse-packages index 61d6b84..e069024 100755 --- a/bin/parse-packages +++ b/bin/parse-packages @@ -68,11 +68,12 @@ for my $suite (@SUITES) { for my $archive (@ARCHIVES) { print "Reading $archive/$suite...\n"; - if (!-d "$TOPDIR/archive/$archive/$suite/") { + my $suite_dir = "$TOPDIR/archive/$archive/$suite"; + if (!-d $suite_dir) { print "\tseems not to exist, skipping...\n"; next; } - open PKG, "zcat $TOPDIR/archive/$archive/$suite/$what/{,debian-installer/}binary-*/Packages.gz|"; + open PKG, "zcat $suite_dir/$what/binary-*/Packages.gz $suite_dir/$what/debian-installer/binary-*/Packages.gz|"; while () { next if /^\s*$/; my $data = ""; @@ -87,9 +88,9 @@ for my $suite (@SUITES) { } # Skip double package next if exists($packages_all_db{"$data{'package'} $data{'architecture'} $data{'version'}"}); - # Skip arch:all for amd64 & gnuab, any non-redundancy is + # Skip arch:all for amd64 & debports, any non-redundancy is # usually a bug anyway - next if ($archive eq 'amd64' or $archive eq 'gnuab') + next if ($archive eq 'amd64' or $archive eq 'debports') and $data{architecture} eq 'all'; if ($data{'provides'}) { @@ -115,10 +116,12 @@ for my $suite (@SUITES) { foreach (@complete_tags) { my ($facet, $tag) = split( /::/, $_, 2); if ($tag =~ s/^\{(.+)\}$/$1/) { + warn "pkg=$data{package} tags=$data{tag}\n" unless $facet && $tag; foreach (split( /,/, $tag )) { push @tags, "${facet}::$_"; } } else { + warn "pkg=$data{package} tags=$data{tag}\n" unless $facet && $tag; push @tags, "${facet}::$tag"; } } @@ -336,11 +339,10 @@ tie %package_postfixes_db, "DB_File", "$DBDIR/package_postfixes.db.new", or die "Error creating DB: $!"; while (my ($k, $v) = each(%package_postfixes)) { $v =~ s/.$//s; - my $nr = $v; - $nr =~ s/[^\000]//g; - $nr = length($nr) + 1; # < number of hits + my $nr = ($v =~ tr/\000/\000/) + 1; if ($nr > $MAX_PACKAGE_POSTFIXES) { - $v = "\001" . $nr; + $v = ($v =~ /\^/) ? "^\001" . $nr + : "\001" . $nr; } $package_postfixes_db{$k} = $v; }