The following commit has been merged in the master branch: commit 0853919f5c968a9a914acb098be7749ba53c8f6d Author: Guillem Jover <guil...@debian.org> Date: Fri Jan 20 00:55:30 2012 +0100
dpkg-shlibdeps: Improve and clarify superfluous linking warning messages Closes: #656496 Based-on-patch-by: Peter Eisentraut <pet...@debian.org> diff --git a/debian/changelog b/debian/changelog index 9ec4867..8adcaab 100644 --- a/debian/changelog +++ b/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 <pet...@debian.org>. Closes: #656496 [ Raphaƫl Hertzog ] * Update Dpkg::Shlibs to look into multiarch paths when cross-building diff --git a/man/dpkg-shlibdeps.1 b/man/dpkg-shlibdeps.1 index 9bbc8eb..6c9b955 100644 --- a/man/dpkg-shlibdeps.1 +++ b/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 diff --git a/scripts/dpkg-shlibdeps.pl b/scripts/dpkg-shlibdeps.pl index c91dc8c..25afbd4 100755 --- a/scripts/dpkg-shlibdeps.pl +++ b/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); } } -- dpkg's main repository -- To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org