From 05c04ffc005ce29a4017a8e8c48389cca0911ed1 Mon Sep 17 00:00:00 2001 From: Raphael Hertzog Date: Wed, 26 Sep 2007 11:45:04 +0200 Subject: [PATCH] dpkg-shlibdeps: look into package directories before the root filesytem When dpkg-shlibdeps tries to find a library, it will scan the same directories as ld.so but at various "virtual root" (the real root and also the root of the build trees). The root of the built packages should have precedence otherwise we might analyze outdated files which are installed in the root filesystem and which would be replaced by the package being built. --- scripts/dpkg-shlibdeps.pl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/dpkg-shlibdeps.pl b/scripts/dpkg-shlibdeps.pl index 5f435866..cc188532 100755 --- a/scripts/dpkg-shlibdeps.pl +++ b/scripts/dpkg-shlibdeps.pl @@ -414,8 +414,7 @@ sub symfile_has_soname { # find_library ($soname, \@rpath, $format) sub my_find_library { my ($lib, $rpath, $format) = @_; - my $file = find_library($lib, $rpath, $format, ""); - return $file if defined($file); + my $file; # Look into the packages we're currently building (but only those # that provides shlibs file...) @@ -425,6 +424,12 @@ sub my_find_library { $file = find_library($lib, $rpath, $format, $builddir); return $file if defined($file); } + + # Fallback in the root directory if we have not found what we were + # looking for in the packages + $file = find_library($lib, $rpath, $format, ""); + return $file if defined($file); + return undef; } -- 2.39.5