The following commit has been merged in the master branch:
commit 25546527aadecccb860d9b8cce51732f270bcbeb
Author: Raphael Hertzog <[EMAIL PROTECTED]>
Date:   Sun Feb 3 18:54:00 2008 +0100

    dpkg-shlibdeps: some accuracy improvements for warnings about unused 
libraries
    
    * scripts/dpkg-shlibdeps.pl: Handle better the case when the
    library found has a different soname than the one used to look up
    the library file. Properly affect symbols coming from it to the
    soname wanted by the binary, thus avoiding invalid warnings about
    unused library.

diff --git a/ChangeLog b/ChangeLog
index 3b0d1c7..25f8650 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-02-03  Raphael Hertzog  <[EMAIL PROTECTED]>
+
+       * scripts/dpkg-shlibdeps.pl: Handle better the case when the
+       library found has a different soname than the one used to look up
+       the library file. Properly affect symbols coming from it to the
+       soname wanted by the binary, thus avoiding invalid warnings about
+       unused library.
+
 2008-01-31  Raphael Hertzog  <[EMAIL PROTECTED]>
 
        * scripts/dpkg-genchanges.pl: Always list all binary packages in
diff --git a/debian/changelog b/debian/changelog
index 6d44911..ae313fb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -27,6 +27,8 @@ dpkg (1.14.17) UNRELEASED; urgency=low
     files. It's nice for reviewers and mentors.debian.net was using this field
     on source only uploads to display short description of what the package is
     about.
+  * Handle the case when the library has a different SONAME than the one used
+    to find it. Closes: #462413
 
   [ Frank Lichtenheld ]
   * Add a warning in dpkg-buildpackage if the build-dependencies are not
diff --git a/scripts/dpkg-shlibdeps.pl b/scripts/dpkg-shlibdeps.pl
index 3d68585..e60ed7f 100755
--- a/scripts/dpkg-shlibdeps.pl
+++ b/scripts/dpkg-shlibdeps.pl
@@ -125,6 +125,7 @@ foreach my $file (keys %exec) {
     my %libfiles;
     my %altlibfiles;
     my %soname_notfound;
+    my %alt_soname;
     foreach my $soname (@sonames) {
        my $lib = my_find_library($soname, $obj->{RPATH}, $obj->{format}, 
$file);
        unless (defined $lib) {
@@ -194,6 +195,10 @@ foreach my $file (keys %exec) {
            } else {
                # No symbol file found, fall back to standard shlibs
                my $id = $dumplibs_wo_symfile->parse($lib);
+               if ($id ne $soname) {
+                   warning(_g("%s has an unexpected SONAME (%s)"), $lib, $id);
+                   $alt_soname{$id} = $soname;
+               }
                push @soname_wo_symfile, $soname;
                my $libobj = $dumplibs_wo_symfile->get_object($id);
                # Only try to generate a dependency for libraries with a SONAME
@@ -262,6 +267,10 @@ foreach my $file (keys %exec) {
                    }
                }
            } else {
+               if (exists $alt_soname{$syminfo->{soname}}) {
+                   # Also count usage on alternate soname
+                   $used_sonames{$alt_soname{$syminfo->{soname}}}++;
+               }
                $used_sonames{$syminfo->{soname}}++;
            }
        }

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to