Hi,

Could you please consider applying the proposed patch at some time? It
is really needed for hurd and amd64 packages, it has been tested for
quite a long time now and should be fine, here it is again.

--- /usr/bin/dpkg-shlibdeps     2004-11-11 21:15:52.000000000 +0100
+++ /mnt/hurd/usr/bin/dpkg-shlibdeps    2004-12-27 15:51:54.000000000 +0100
@@ -8,6 +8,7 @@
 
 use POSIX;
 use POSIX qw(:errno_h :signal_h);
+use File::stat;
 
 $shlibsoverride= '/etc/dpkg/shlibs.override';
 $shlibsdefault= '/etc/dpkg/shlibs.default';
@@ -119,14 +120,16 @@
        if (m,^\s*NEEDED\s+,) {
            if (m,^\s*NEEDED\s+((\S+)\.so\.(\S+))$,) {
                push(@libname,$2); push(@libsoname,$3);
+               push(@libfiles,$1);
                push(@libf,$execf[$i]);
                &warn("could not find path for $1") unless 
defined($so2path{$1});
-               push(@libfiles,$so2path{$1});
+               push(@libpaths,$so2path{$1});
            } elsif (m,^\s*NEEDED\s+((\S+)-(\S+)\.so)$,) {
                push(@libname,$2); push(@libsoname,$3);
+               push(@libfiles,$1);
                push(@libf,$execf[$i]);
                &warn("could not find path for $1") unless 
defined($so2path{$1});
-               push(@libfiles,$so2path{$1});
+               push(@libpaths,$so2path{$1});
            } else {
                m,^\s*NEEDED\s+(\S+)$,;
                &warn("format of $1 not recognized");
@@ -168,8 +171,9 @@
            || 
scanshlibsfile($shlibsoverride,$libname[$i],$libsoname[$i],$libf[$i])) {
            splice(@libname, $i, 1);
            splice(@libsoname, $i, 1);
-           splice(@libf, $i, 1);
            splice(@libfiles, $i, 1);
+           splice(@libf, $i, 1);
+           splice(@libpaths, $i, 1);
            $i--;
            next PRELIB;
        }
@@ -177,8 +181,9 @@
            if(scanshlibsfile($shlibsfile, $libname[$i], $libsoname[$i], 
$libf[$i])) {
                splice(@libname, $i, 1);
                splice(@libsoname, $i, 1);
-               splice(@libf, $i, 1);
                splice(@libfiles, $i, 1);
+               splice(@libf, $i, 1);
+               splice(@libpaths, $i, 1);
                $i--;
                next PRELIB;
            }
@@ -200,8 +205,11 @@
        if (m/^local diversion |^diversion by/) {
            &warn("diversions involved - output may be incorrect");
            print(STDERR " $_\n") || syserr("write diversion info to stderr");
-       } elsif (m=^(\S+(, \S+)*): (\S+)$=) {
-           push @{$pathpackages{$+}}, split(/, /, $1);
+       } elsif (m=^(\S+(, \S+)*): (/(\S+/)*(\S+))$=) {
+           for $p (split(/, /, $1)) {
+               push(@{$filepackages{$+}}, $p);
+               push(@{$filepackagespath{$+}}, $3);
+          }
        } else {
            &warn("unknown output from dpkg --search: \`$_'");
        }
@@ -210,19 +218,25 @@
 }
 
 LIB: for ($i=0;$i<=$#libname;$i++) {
-    if (!defined($pathpackages{$libfiles[$i]})) {
-        &warn("could not find any packages for $libfiles[$i]".
+    if (!defined($filepackages{$libfiles[$i]})) {
+        &warn("could not find any packages for $libpaths[$i]".
               " ($libname[$i].so.$libsoname[$i])");
     } else {
-        for $p (@{$pathpackages{$libfiles[$i]}}) {
-            scanshlibsfile("$shlibsppdir/$p$shlibsppext",
+        @pl = @{$filepackages{$libfiles[$i]}};
+        for ($j=0;$j<=$#pl;$j++) {
+           $stl = stat($libpaths[$i]);
+           $stp = stat($filepackagespath{$libfiles[$i]}[$j]);
+           if ($stl->dev != $stp->dev || $stl->ino != $stp->ino) {
+               next;
+           }
+            scanshlibsfile("$shlibsppdir/$pl[$j]$shlibsppext",
                            $libname[$i],$libsoname[$i],$libf[$i])
                 && next LIB;
         }
     }
     scanshlibsfile($shlibsdefault,$libname[$i],$libsoname[$i],$libf[$i]) && 
next;
     &warn("unable to find dependency information for ".
-          "shared library $libname[$i] (soname $libsoname[$i], path 
$libfiles[$i], ".
+          "shared library $libname[$i] (soname $libsoname[$i], path 
$libpaths[$i], ".
           "dependency field $libf[$i])");
 }
 



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

Reply via email to