$/ = "";
-for my $archive (@ARCHIVES) {
- for my $suite (@SUITES) {
+for my $suite (@SUITES) {
+ my %package_names_suite = ();
+ my %packages_all_db;
+ tie %packages_all_db, "DB_File", "$DBDIR/packages_all_$suite.db.new",
+ O_RDWR|O_CREAT, 0666, $DB_BTREE
+ or die "Error creating DB: $!";
- my %package_names_suite = ();
+ for my $archive (@ARCHIVES) {
print "Reading $archive/$suite...\n";
- my %packages_all_db;
- tie %packages_all_db, "DB_File", "$DBDIR/packages_all_$suite.db.new",
- O_RDWR|O_CREAT, 0666, $DB_BTREE
- or die "Error creating DB: $!";
open PKG, "zcat $TOPDIR/archive/$archive/$suite/$what/{,debian-installer/}binary-*/Packages.gz|";
while (<PKG>) {
next if /^\s*$/;
$packages_all_db{"$data{'package'} $data{'architecture'} $data{'version'}"}
= $data;
}
+ }
- open NAMES, '>>', "$DBDIR/package_names_$suite.txt.new"
- or die "Error creating package names list: $!";
- foreach (sort keys %package_names_suite) {
- print NAMES "$_\n";
- }
- close NAMES;
-
- untie %packages_all_db;
+ open NAMES, '>>', "$DBDIR/package_names_$suite.txt.new"
+ or die "Error creating package names list: $!";
+ foreach (sort keys %package_names_suite) {
+ print NAMES "$_\n";
}
+ close NAMES;
+
+ untie %packages_all_db;
}
print "Writing databases...\n";