Selaa lähdekoodia

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 19 vuotta sitten
vanhempi
commit
05c04ffc00
1 muutettua tiedostoa jossa 7 lisäystä ja 2 poistoa
  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;
 }