Fail more gracefully if wb-edos-builddebcheck is not found
authorJoachim Breitner <nomeata@debian.org>
Tue, 28 Jul 2009 11:03:02 +0000 (13:03 +0200)
committerJoachim Breitner <nomeata@debian.org>
Tue, 28 Jul 2009 11:03:02 +0000 (13:03 +0200)
bin/wanna-build

index d08da9386f3d967e46ca2b8d394f4fe52914d1c3..4a2286010abff586275cd1e391761f2a00670483 100755 (executable)
@@ -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( <EDOS> ) {
-           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( <EDOS> ) {
+               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};