]> err.no Git - dpkg/commitdiff
Dpkg::Shlibs: Always consider all paths from LD_LIBRARY_PATH
authorRaphael Hertzog <hertzog@debian.org>
Thu, 22 Nov 2007 11:22:14 +0000 (12:22 +0100)
committerRaphael Hertzog <hertzog@debian.org>
Thu, 22 Nov 2007 11:22:14 +0000 (12:22 +0100)
Paths listed in LD_LIBRARY_PATH were not added at the beginning of the search
path if they were part of the default search paths. Remove this restriction
so that it's possible to change the search order in default paths by using
this variable.

ChangeLog
scripts/Dpkg/Shlibs.pm

index b5eb5dd82b5b7db9846b6000bcf399cc5f0d40a6..42e0c4c1648713148cac0bffe53e12ec9cd4d0e9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,7 +5,10 @@
        not found by "dpkg -S", try the same on the realpath of the
        library as fallback before deciding that it's a library being
        built.
-
+       * scripts/Dpkg/Shlibs.pm: Always add paths from LD_LIBRARY_PATH
+       at the beginning of the list of path to search, even if they
+       are already listed (one might want to use LD_LIBRARY_PATH to
+       change the search order).
 
 2007-11-21  Raphael Hertzog  <hertzog@debian.org>
 
index 28225dfc746f31cd69dca9b896aa7c2e5ccec332..03916bb5fd6dcd949a424c96a895429e4d96b317 100644 (file)
@@ -35,9 +35,7 @@ our @librarypaths = (DEFAULT_LIBRARY_PATH);
 if ($ENV{LD_LIBRARY_PATH}) {
     foreach my $path (reverse split( /:/, $ENV{LD_LIBRARY_PATH} )) {
        $path =~ s{/+$}{};
-       unless (scalar grep { $_ eq $path } @librarypaths) {
-           unshift @librarypaths, $path;
-       }
+       unshift @librarypaths, $path;
     }
 }