From ee56ab367f5d9c102cebdcc47a856e294083a965 Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Tue, 12 Oct 1999 15:18:38 +0000 Subject: [PATCH] dpkg-scanpackages: don't die if we can't open a package --- ChangeLog | 5 +++++ scripts/dpkg-scanpackages.pl | 15 +++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) 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//) { -- 2.39.5