From: Jeroen van Wolffelaar Date: Thu, 23 Feb 2006 10:35:38 +0000 (+0000) Subject: Put $architecture loop in the inner, and ensure all kind of suite-specific X-Git-Tag: switch-to-templates~55 X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=5b187d705a2e3e2e3baf636fa24f129ec451eda6;p=deb%2Fpackages.git Put $architecture loop in the inner, and ensure all kind of suite-specific databases are really suite-specific, and not just have info of the last processed $archive --- diff --git a/bin/parse-packages b/bin/parse-packages index e441515..f252a29 100755 --- a/bin/parse-packages +++ b/bin/parse-packages @@ -50,15 +50,15 @@ my %priorities = (); $/ = ""; -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 () { next if /^\s*$/; @@ -141,16 +141,16 @@ for my $archive (@ARCHIVES) { $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";