Przeglądaj źródła

dpkg-shlibdeps: print the error note about missing libraries only once

With the previous change, dpkg-shlibdeps can now print the error about
missing library multiple times. It makes no sense to print the associated
note multiple times. Instead it should be printed once at the end.
Raphaël Hertzog 15 lat temu
rodzic
commit
f3fa58a331
1 zmienionych plików z 6 dodań i 5 usunięć
  1. 6 5
      scripts/dpkg-shlibdeps.pl

+ 6 - 5
scripts/dpkg-shlibdeps.pl

@@ -171,10 +171,8 @@ foreach my $file (keys %exec) {
 	unless (defined $lib) {
 	    $soname_notfound{$soname} = 1;
 	    $global_soname_notfound{$soname} = 1;
-	    my $msg = _g("couldn't find library %s needed by %s (ELF format: '%s'; RPATH: '%s').\n" .
-			 "Note: libraries are not searched in other binary packages " .
-			 "that do not have any shlibs or symbols file.\nTo help dpkg-shlibdeps " .
-			 "find private libraries, you might need to set LD_LIBRARY_PATH.");
+	    my $msg = _g("couldn't find library %s needed by %s (ELF " .
+			 "format: '%s'; RPATH: '%s').");
 	    if (scalar(split_soname($soname))) {
 		errormsg($msg, $soname, $file, $obj->{format}, join(":", @{$obj->{RPATH}}));
 		$error_count++;
@@ -429,9 +427,12 @@ foreach my $soname (keys %global_soname_needed) {
 
 # Quit now if any missing libraries
 if ($error_count >= 1) {
+    my $note = _g("Note: libraries are not searched in other binary packages " .
+	"that do not have any shlibs or symbols file.\nTo help dpkg-shlibdeps " .
+	"find private libraries, you might need to set LD_LIBRARY_PATH.");
     error(P_("Cannot continue due to the error above.",
              "Cannot continue due to the errors listed above.",
-             $error_count));
+             $error_count) . "\n" . $note);
 }
 
 # Open substvars file