Explorar o código

Dpkg::Shlibs: Do not use an intermediate library path variable

Assign directly to @librarypaths when adding the cross-compilation
library paths.
Guillem Jover %!s(int64=11) %!d(string=hai) anos
pai
achega
845d011793
Modificáronse 1 ficheiros con 5 adicións e 5 borrados
  1. 5 5
      scripts/Dpkg/Shlibs.pm

+ 5 - 5
scripts/Dpkg/Shlibs.pm

@@ -77,9 +77,12 @@ sub blank_library_paths {
 }
 
 sub setup_library_paths {
+    @librarypaths = DEFAULT_LIBRARY_PATH;
+
+    push @librarypaths, DEFAULT_MULTILIB_PATH;
+
     # Adjust set of directories to consider when we're in a situation of a
     # cross-build or a build of a cross-compiler.
-    my @crosslibrarypaths;
     my ($crossprefix, $multiarch);
 
     # Detect cross compiler builds.
@@ -96,15 +99,12 @@ sub setup_library_paths {
     }
     # Define list of directories containing crossbuilt libraries.
     if ($crossprefix) {
-        push @crosslibrarypaths, "/lib/$multiarch", "/usr/lib/$multiarch",
+        push @librarypaths, "/lib/$multiarch", "/usr/lib/$multiarch",
              "/$crossprefix/lib", "/usr/$crossprefix/lib",
              "/$crossprefix/lib32", "/usr/$crossprefix/lib32",
              "/$crossprefix/lib64", "/usr/$crossprefix/lib64";
     }
 
-    @librarypaths = (DEFAULT_LIBRARY_PATH, DEFAULT_MULTILIB_PATH,
-                     @crosslibrarypaths);
-
     # XXX: Deprecated. Update library paths with LD_LIBRARY_PATH.
     if ($ENV{LD_LIBRARY_PATH}) {
         foreach my $path (reverse split( /:/, $ENV{LD_LIBRARY_PATH})) {