From: Wichert Akkerman Date: Tue, 12 Oct 1999 15:18:38 +0000 (+0000) Subject: dpkg-scanpackages: don't die if we can't open a package X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee56ab367f5d9c102cebdcc47a856e294083a965;p=dpkg dpkg-scanpackages: don't die if we can't open a package --- diff --git a/ChangeLog b/ChangeLog index 044bff7f..22874b8f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Oct 12 17:15:08 CEST 1999 Wichert Akkerman + + * don't die if we can't open a package in dpkg-scanpackages, just print + a warning and skip the package. + Mon Oct 11 18:18:25 CEST 1999 Wichert Akkerman * Move dselect into its own package diff --git a/scripts/dpkg-scanpackages.pl b/scripts/dpkg-scanpackages.pl index d1fe1a65..853c7d5d 100755 --- a/scripts/dpkg-scanpackages.pl +++ b/scripts/dpkg-scanpackages.pl @@ -39,12 +39,19 @@ $#ARGV == 1 || $#ARGV == 2 open(F,"find $binarydir/ -follow -name '*.deb' -print |") or die "Couldn't open pipe to find: $!\n"; while () { - chop($fn=$_); + chomp($fn=$_); substr($fn,0,length($binarydir)) eq $binarydir or die "$fn not in binary dir $binarydir\n"; - $t= `dpkg-deb -I $fn control` - or die "Couldn't call dpkg-deb on $fn: $!\n"; - $? and die "\`dpkg-deb -I $fn control' exited with $?\n"; + $t= `dpkg-deb -I $fn control`; + if ($t eq "") { + warn "Couldn't call dpkg-deb on $fn: $!, skipping package\n"; + next; + } + if ($?) { + warn "\`dpkg-deb -I $fn control' exited with $?, skipping package\n"; + next; + } + undef %tv; $o= $t; while ($t =~ s/^\n*(\S+):[ \t]*(.*(\n[ \t].*)*)\n//) {