From fefb96bc171b01d22455c7919a5cae20e33da8f8 Mon Sep 17 00:00:00 2001 From: Joachim Breitner Date: Tue, 28 Jul 2009 13:03:02 +0200 Subject: [PATCH] Fail more gracefully if wb-edos-builddebcheck is not found --- bin/wanna-build | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/bin/wanna-build b/bin/wanna-build index d08da93..4a22860 100755 --- a/bin/wanna-build +++ b/bin/wanna-build @@ -2583,24 +2583,26 @@ sub call_edos_depcheck { #print "I would look at these sources with edos-depcheck:\n"; #print join " ", keys %interesting_packages,"\n"; - open(EDOS,"-|","wb-edos-builddebcheck", "-a", $arch, $packagesfile, $sourcesfile) - or die "Failed to run wb-edos-builddebcheck: $!\n"; - - local($/) = ""; # read in paragraph mode - while( ) { - my( $key, $reason ) ; - s/\s*$//m; - /^Package:\s*(\S+)$/mi and $key = $1; - /^Failed-Why:(([^\n]|\n ([^\n]|\.))*)$/msi and $reason = $1; - $reason =~ s/^\s*//mg; - - if (exists $interesting_packages{$key}) { - $interesting_packages{$key} = $reason; - } else { - print "TODO: edos reported a package we do not care about now" if $verbose; - } + if (open(EDOS,"-|","wb-edos-builddebcheck", "-a", $arch, $packagesfile, $sourcesfile)) { + local($/) = ""; # read in paragraph mode + while( ) { + my( $key, $reason ) ; + s/\s*$//m; + /^Package:\s*(\S+)$/mi and $key = $1; + /^Failed-Why:(([^\n]|\n ([^\n]|\.))*)$/msi and $reason = $1; + $reason =~ s/^\s*//mg; + + if (exists $interesting_packages{$key}) { + $interesting_packages{$key} = $reason; + } else { + print "TODO: edos reported a package we do not care about now" if $verbose; + } + } + close EDOS; + } else { + print "ERROR: Could not run wb-edos-builddebcheck. I am continuing, assuming\n" . + "all packages have installable build-dependencies." } - close EDOS; for my $key (keys %interesting_packages) { my $pkg = $db{$key}; -- 2.39.5