Kaynağa Gözat

dpkg-shlibdeps: Improve and clarify superfluous linking warning messages

Closes: #656496

Based-on-patch-by: Peter Eisentraut <petere@debian.org>
Guillem Jover 14 yıl önce
ebeveyn
işleme
0853919f5c
3 değiştirilmiş dosya ile 18 ekleme ve 11 silme
  1. 2 0
      debian/changelog
  2. 8 5
      man/dpkg-shlibdeps.1
  3. 8 6
      scripts/dpkg-shlibdeps.pl

+ 2 - 0
debian/changelog

@@ -55,6 +55,8 @@ dpkg (1.16.2) UNRELEASED; urgency=low
   * Fix start-stop-daemon --name option on GNU/Hurd to match the process name.
   * Document in more detail the implications of start-stop-daemon matching
     options. Closes: #367608
+  * Improve and clarify dpkg-shlibdeps superfluous linking warning messages.
+    Based on a patch by Peter Eisentraut <petere@debian.org>. Closes: #656496
 
   [ Raphaël Hertzog ]
   * Update Dpkg::Shlibs to look into multiarch paths when cross-building

+ 8 - 5
man/dpkg-shlibdeps.1

@@ -1,4 +1,4 @@
-.TH dpkg\-shlibdeps 1 "2011-08-14" "Debian Project" "dpkg utilities"
+.TH dpkg\-shlibdeps 1 "2012-01-20" "Debian Project" "dpkg utilities"
 .SH NAME
 dpkg\-shlibdeps \- generate shared library substvar dependencies
 .
@@ -203,8 +203,8 @@ even if they are not yet used by other packages.
 can be emitted by \fBdpkg\-shlibdeps\fP.
 Bit 0 (value=1) enables the warning "symbol \fIsym\fP used by \fIbinary\fP
 found in none of the libraries", bit 1 (value=2) enables the warning
-"dependency on \fIlibrary\fP could be avoided" and bit 2 (value=4)
-enables the warning "\fIbinary\fP shouldn't be linked with \fIlibrary\fP".
+"package could avoid a useless dependency" and bit 2 (value=4)
+enables the warning "\fIbinary\fP should not be linked against \fIlibrary\fP".
 The default \fIvalue\fP is 3: the first two warnings are active by
 default, the last one is not. Set \fIvalue\fP to 7 if you want all
 warnings to be active.
@@ -247,13 +247,16 @@ that it's a real library and that programs linking to it are using an
 RPATH so that the dynamic loader finds it. In that case, the library is
 broken and needs to be fixed.
 .TP
-.BI "dependency on " library " could be avoided if " binaries " were not uselessly linked against it (they use none of its symbols)."
+.BI "package could avoid a useless dependency if " binary " was not linked against " library " (it uses none of the library's symbols)"
 None of the \fIbinaries\fP that are linked with \fPlibrary\fP use any of the
 symbols provided by the library. By fixing all the binaries, you would avoid
 the dependency associated to this library (unless the same dependency is
 also generated by another library that is really used).
 .TP
-.IB binary " shouldn't be linked with " library " (it uses none of its symbols)."
+.BI "package could avoid a useless dependency if " binaries " were not linked against " library " (they uses none of the library's symbols)"
+Exactly the same as the above warning, but for multiple binaries.
+.TP
+.IB binary " should not be linked against " library " (it uses none of the library's symbols)"
 The \fIbinary\fR is linked to a library that it doesn't need. It's not a
 problem but some small performance improvements in binary load time can be
 obtained by not linking this library to this binary. This warning checks

+ 8 - 6
scripts/dpkg-shlibdeps.pl

@@ -406,8 +406,8 @@ foreach my $file (keys %exec) {
 	    next if ($soname =~ /^libm\.so\.\d+$/ and
 		     scalar grep(/^libstdc\+\+\.so\.\d+/, @sonames));
             next unless ($warnings & WARN_NOT_NEEDED);
-	    warning(_g("%s shouldn't be linked with %s (it uses none of its " .
-	               "symbols)."), $file, $soname);
+	    warning(_g("%s should not be linked against %s (it uses none of " .
+	               "the library's symbols)."), $file, $soname);
 	}
     }
 }
@@ -419,10 +419,12 @@ foreach my $soname (keys %global_soname_needed) {
         next if ($soname =~ /^libm\.so\.\d+$/ and scalar(
                  grep(/^libstdc\+\+\.so\.\d+/, keys %global_soname_needed)));
         next unless ($warnings & WARN_DEP_AVOIDABLE);
-        warning(_g("dependency on %s could be avoided if \"%s\" were not " .
-                   "uselessly linked against it (they use none of its " .
-                   "symbols)."), $soname,
-                   join(" ", @{$global_soname_needed{$soname}}));
+        warning(P_("package could avoid a useless dependency if %s was not " .
+                   "linked against %s (it uses none of the library's symbols).",
+                   "package could avoid a useless dependency if %s were not " .
+                   "linked against %s (they use none of the library's symbols).",
+                   scalar @{$global_soname_needed{$soname}}),
+                join(" ", @{$global_soname_needed{$soname}}), $soname);
     }
 }