From: Raphael Hertzog Date: Thu, 22 Nov 2007 11:22:14 +0000 (+0100) Subject: Dpkg::Shlibs: Always consider all paths from LD_LIBRARY_PATH X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a3f6436bcdfed21e7edc0c1c8c60322b590298b;p=dpkg Dpkg::Shlibs: Always consider all paths from LD_LIBRARY_PATH 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. --- diff --git a/ChangeLog b/ChangeLog index b5eb5dd8..42e0c4c1 100644 --- 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 diff --git a/scripts/Dpkg/Shlibs.pm b/scripts/Dpkg/Shlibs.pm index 28225dfc..03916bb5 100644 --- a/scripts/Dpkg/Shlibs.pm +++ b/scripts/Dpkg/Shlibs.pm @@ -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; } }