X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=bin%2Fparse-packages;h=189ea0267ea78e946f1b3def780ea1561b1c149d;hb=c9b031f918706ac1dd5e0710a7460a5bcd71fee2;hp=ac5bd2c882ee29a61a1c75bdb926e6b9f6707445;hpb=33c3adfb631d4c1fb6690a02117674a984d0e6ee;p=deb%2Fpackages.git diff --git a/bin/parse-packages b/bin/parse-packages index ac5bd2c..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*$/; @@ -74,6 +81,9 @@ for my $suite (@SUITES) { } # 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'}) {