3 use MLDBM qw(DB_File Storable);
6 $MLDBM::DumpMeth=q(portable);
10 tie %db, "MLDBM", "versions.idx.new", O_CREAT|O_RDWR, 0664
11 or die "tie versions.idx.new: $!";
12 tie %db2, "MLDBM", "versions_time.idx.new",O_CREAT|O_RDWR, 0664
13 or die "tie versions_time.idx.new failed: $!";
18 print "$archive/$dist/$arch\n";
22 my $extra_source_only = 0;
24 if (/^Package: (.*)/) { $p = $1; }
25 elsif (/^Version: (.*)/) { $v = $1; }
26 elsif (/^Extra-Source-Only: yes/) {
27 $extra_source_only = 1;
30 if ($extra_source_only) {
31 $extra_source_only = 0;
34 update_package_version($p,$v,$time);
37 update_package_version($p,$v,$time) unless $extra_source_only;
39 sub update_package_version {
43 # we allow multiple versions in an architecture now; this
44 # should really only happen in the case of source, however.
45 push @{$tmp->{$dist}{$arch}}, $v;
48 $tmp->{$dist}{$arch}{$v} = $time if not exists
49 $tmp->{$dist}{$arch}{$v};