From: Jeroen van Wolffelaar Date: Wed, 1 Feb 2006 23:51:41 +0000 (+0000) Subject: Implement source postfixes X-Git-Tag: switch-to-templates~210 X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=0acb0c026bd612e3f60c91748f83f454214341a9;p=deb%2Fpackages.git Implement source postfixes --- diff --git a/bin/parse-sources b/bin/parse-sources index 4976260..91e8ad5 100755 --- a/bin/parse-sources +++ b/bin/parse-sources @@ -22,9 +22,13 @@ use strict; my $what = $ARGV[0] ? "non-free" : "*"; +# max. distinct results for a given package postfix +my $MAX_SOURCE_POSTFIXES = 100; use DB_File; my %sources_small = (); +my %source_names = (); +my %source_postfixes = (); my @suites = ('oldstable', 'stable', 'testing', 'unstable', 'experimental'); @@ -53,6 +57,9 @@ for my $suite (@suites) { } $sources_all_db{"$data{'package'} $data{'version'}"} = $data; + + $source_names{$data{'package'}} = 1; + my $section = 'main'; my $subsection = $data{section}; if ($data{section} && ($data{section} =~ m=/=o)) { @@ -77,7 +84,32 @@ while (my ($k, $v) = each(%sources_small)) { } untie %sources_small_db; +# package names stuff: +for my $pkg (keys %source_names) { + for (my $i=0;$i $MAX_SOURCE_POSTFIXES) { + $v = "\001" . $nr; + } + $source_postfixes_db{$k} = $v; +} +untie %source_postfixes_db; + for my $suite (@suites) { rename("sources_all_$suite.db.new", "sources_all_$suite.db"); } rename("sources_small.db.new", "sources_small.db"); +rename("source_postfixes.db.new", "source_postfixes.db");