]> git.donarmstrong.com Git - debbugs.git/blobdiff - examples/debian/versions/build-mldbm.pl
allow multiple versions in an architecture (but really only for source)
[debbugs.git] / examples / debian / versions / build-mldbm.pl
index f91d3d558fb3b0443d7be0358f510a699e67d804..9bcf44b366bf3001ae817fa84a3788481aa0b8d5 100755 (executable)
@@ -6,6 +6,7 @@ use Fcntl;
 $MLDBM::DumpMeth=q(portable);
 
 my %db;
+my %db2;
 tie %db, "MLDBM", "versions.idx.new", O_CREAT|O_RDWR, 0664
     or die "tie versions.idx.new: $!";
 tie %db2, "MLDBM", "versions_time.idx.new",O_CREAT|O_RDWR, 0664
@@ -24,7 +25,9 @@ while (<>) {
     elsif (/^$/) {
        # see MLDBM(3pm)/BUGS
        my $tmp = $db{$p};
-       $tmp->{$dist}{$arch} = $v;
+       # we allow multiple versions in an architecture now; this
+       # should really only happen in the case of source, however.
+       push @{$tmp->{$dist}{$arch}}, $v;
        $db{$p} = $tmp;
        $tmp = $db2{$p};
        $tmp->{$dist}{$arch}{$v} = $time if not exists