Explorar el Código

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.
Raphael Hertzog hace 19 años
padre
commit
05c04ffc00
Se han modificado 1 ficheros con 7 adiciones y 2 borrados
  1. 7 2
      scripts/dpkg-shlibdeps.pl

+ 7 - 2
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;
 }