X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=bin%2Fparse-packages;h=189ea0267ea78e946f1b3def780ea1561b1c149d;hb=4a749eda2ed95dbc3180fcdbe5590e2bb2f04198;hp=c411d340c6800fe4f6b9a2de8af79beaa4454f11;hpb=38aca122efcdfa5282e2fb1ec911d4085a6067bf;p=deb%2Fpackages.git diff --git a/bin/parse-packages b/bin/parse-packages index c411d34..189ea02 100755 --- a/bin/parse-packages +++ b/bin/parse-packages @@ -31,6 +31,7 @@ my $MAX_PACKAGE_POSTFIXES = 100; use DB_File; use Storable; +use File::Path; use Deb::Versions; use Packages::Config qw( $TOPDIR $DBDIR @ARCHIVES @SUITES ); &Packages::Config::init( './' ); @@ -50,6 +51,8 @@ my %priorities = (); $/ = ""; +-d $DBDIR || mkpath( $DBDIR ); + for my $suite (@SUITES) { my %package_names_suite = (); my %packages_all_db; @@ -59,6 +62,10 @@ for my $suite (@SUITES) { 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 () { next if /^\s*$/;