The branch, master has been updated
       via  c64c45ec70bd23f02ba26325da89778c9628f438 (commit)
      from  958cfaf886b664651465302534ae60cea6d2a910 (commit)


- Shortlog ------------------------------------------------------------
c64c45e dpkg-shlibdeps: analyze in priority the shlibs of the current package

Summary of changes:
 ChangeLog                 |    6 ++++++
 scripts/dpkg-shlibdeps.pl |   16 ++++++++++------
 2 files changed, 16 insertions(+), 6 deletions(-)
-----------------------------------------------------------------------
Details of changes:

commit c64c45ec70bd23f02ba26325da89778c9628f438
Author: Raphael Hertzog <[EMAIL PROTECTED]>
Date:   Thu Dec 20 09:09:57 2007 +0100

    dpkg-shlibdeps: analyze in priority the shlibs of the current package
    
    When looking for a dependency, consider the shlibs of the current package
    before the shlibs of other binary packages of the same source. This is
    important when a library is built in multiple flavors and each version comes
    with a different dependency for the same library.

diff --git a/ChangeLog b/ChangeLog
index e8ea1bd..497ba7e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-12-20  Raphael Hertzog  <[EMAIL PROTECTED]>
+
+       * scripts/dpkg-shlibdeps.pl: Always consider the shlibs of the
+       current package before the shlibs of other binary packages when
+       looking for a dependency.
+
 2007-12-13  Raphael Hertzog  <[EMAIL PROTECTED]>
 
        * scripts/t/500_Dpkg_Path.t, scripts/Makefile.am: Add new
diff --git a/scripts/dpkg-shlibdeps.pl b/scripts/dpkg-shlibdeps.pl
index 72b34ae..07d8458 100755
--- a/scripts/dpkg-shlibdeps.pl
+++ b/scripts/dpkg-shlibdeps.pl
@@ -98,6 +98,7 @@ my %shlibs;
 
 my $cur_field;
 foreach my $file (keys %exec) {
+    my $pkg_root = guess_pkg_root_dir($file);
     $cur_field = $exec{$file};
     print "Scanning $file (for $cur_field field)\n" if $debug;
 
@@ -180,7 +181,8 @@ foreach my $file (keys %exec) {
                push @soname_wo_symfile, $soname;
                my $libobj = $dumplibs_wo_symfile->get_object($id);
                # Only try to generate a dependency for libraries with a SONAME
-               if ($libobj->is_public_library() and not 
add_shlibs_dep($soname, $pkg)) {
+               if ($libobj->is_public_library() and not
+                   add_shlibs_dep($soname, $pkg, $pkg_root)) {
                    # This failure is fairly new, try to be kind by
                    # ignoring as many cases that can be safely ignored
                    my $ignore = 0;
@@ -442,12 +444,14 @@ sub update_dependency_version {
 }
 
 sub add_shlibs_dep {
-    my ($soname, $pkg) = @_;
+    my ($soname, $pkg, $pkg_root) = @_;
+    my @shlibs = ($shlibslocal, $shlibsoverride);
+    # Make sure the shlibs of the current package is analyzed before the
+    # shlibs of other binary package from the same source
+    push @shlibs, "$pkg_root/DEBIAN/shlibs" if defined($pkg_root);
+    push @shlibs, @pkg_shlibs, "$admindir/info/$pkg.shlibs", $shlibsdefault;
     print "Looking up shlibs dependency of $soname provided by '$pkg'\n" if 
$debug;
-    foreach my $file ($shlibslocal, $shlibsoverride, @pkg_shlibs,
-                       "$admindir/info/$pkg.shlibs",
-                       $shlibsdefault)
-    {
+    foreach my $file (@shlibs) {
        next if not -e $file;
        my $dep = extract_from_shlibs($soname, $file);
        if (defined($dep)) {

-- 
dpkg's main repository


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

Reply via email to