X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=bin%2Fparse-sources;h=89f071d42d389bf77c4f05d997ddce019b0060ca;hb=7c2613f427eaf733f6d0c03e671c289deaefd9cd;hp=e640b9d3dfae2581421f77cd6ba75caaa567fb7c;hpb=f46c14dbc13274569f533b19e27c61960ea9bacd;p=deb%2Fpackages.git diff --git a/bin/parse-sources b/bin/parse-sources index e640b9d..89f071d 100755 --- a/bin/parse-sources +++ b/bin/parse-sources @@ -53,11 +53,14 @@ for my $archive (@ARCHIVES) { while (/^(\S+):\s*(.*)\s*$/mg) { my ($key, $value) = ($1, $2); $value =~ s/\377/\n /g; - $data .= "$key: $value\n"; $key =~ tr [A-Z] [a-z]; $data{$key} = $value; } $source_names{$data{'package'}} = 1; + delete $data{'binary'}; + + $data{files} =~ s/\s*\n\s*/\01/sog; + $data{files} =~ s/^\01//sg; my $section = 'main'; my $subsection = $data{section} || '-'; @@ -72,13 +75,13 @@ for my $archive (@ARCHIVES) { $sources_small{$data{'package'}} .= "$archive $suite $section $subsection $data{'priority'} $data{'version'}\000"; - $data{archive} = $archive; while (my ($key, $value) = each (%data)) { - next if $key eq 'package' or $key eq 'version'; + next if $key eq 'package' or $key eq 'archive' or $key eq 'suite'; print STDERR "WARN: $key ($suite/$archive/$data{package}/$data{architecture}\n" unless defined $value; - $data .= "$key: $value\n"; + $data .= "$key\00$value\00"; } - $sources_all_db{"$data{'package'} $data{'version'}"} + $data =~ s/.$//so; + $sources_all_db{"$archive $suite $data{'package'}"} = $data; }