use DB_File;
use Storable;
+use File::Path;
use Deb::Versions;
use Packages::Config qw( $TOPDIR $DBDIR @ARCHIVES @SUITES );
&Packages::Config::init( './' );
$/ = "";
+-d $DBDIR || mkpath( $DBDIR );
+
for my $suite (@SUITES) {
my %package_names_suite = ();
my %packages_all_db;
for my $archive (@ARCHIVES) {
print "Reading $archive/$suite...\n";
+ if (!-d "$TOPDIR/archive/$archive/$suite/") {
+ print "\tseems not to exist, skipping...\n";
+ next;
+ }
open PKG, "zcat $TOPDIR/archive/$archive/$suite/$what/{,debian-installer/}binary-*/Packages.gz|";
while (<PKG>) {
next if /^\s*$/;
}
# Skip double package
next if exists($packages_all_db{"$data{'package'} $data{'architecture'} $data{'version'}"});
+ # Skip arch:all for amd64&kfreebsd, too often broken
+ next if ($archive eq 'amd64' or $archive eq 'kfreebsd')
+ and $data{architecture} eq 'all';
if ($data{'provides'}) {
foreach (split /\s*,\s*/, $data{'provides'}) {