Blame SOURCES/0040-dracut-functions.sh-Avoid-loading-unnecessary-32-bit.patch

a56a5e
From 03bf7758aa08e6533f438b4a60b4d5bd1847b1cd Mon Sep 17 00:00:00 2001
966cef
From: Colin Guthrie <colin@mageia.org>
966cef
Date: Sat, 2 Nov 2013 11:26:30 +0000
966cef
Subject: [PATCH] dracut-functions.sh: Avoid loading unnecessary 32-bit
966cef
 libraries for 64-bit initrds
966cef
966cef
Due to the 'inst_libdir_file "libnss_files*"' in the udev-rules module
966cef
this caues the /usr/lib/libnss_files-2.18.so* to be included. This is a
966cef
32-bit library and pulls in a 32-bit version of glibc also even on a
966cef
64-bit system.
966cef
966cef
This is due to the fact that ldconfig -pN will print [/usr]/lib paths
966cef
from the cache as well as [/usr]/lib64. As we handle these paths
966cef
specifically we should ignore these results from the cache.
966cef
966cef
Also there was a missing space when appending the ldconfig paths
966cef
onto our list meaning the last builtin and first ldconfig path
966cef
were unusable.
966cef
---
966cef
 dracut-functions.sh | 3 ++-
966cef
 1 file changed, 2 insertions(+), 1 deletion(-)
966cef
966cef
diff --git a/dracut-functions.sh b/dracut-functions.sh
1755ca
index 38095ba4..2872516a 100755
966cef
--- a/dracut-functions.sh
966cef
+++ b/dracut-functions.sh
966cef
@@ -65,6 +65,7 @@ ldconfig_paths()
966cef
             printf "%s\n" ${d%/*};
966cef
         done
966cef
     ); do
966cef
+        [[ "$i" = "/lib" || "$i" = "/usr/lib" || "$i" = "/lib64" || "$i" = "/usr/lib64" ]] && continue
966cef
         a["$i"]=1;
966cef
     done;
966cef
     printf "%s\n" ${!a[@]}
966cef
@@ -81,7 +82,7 @@ if ! [[ $libdirs ]] ; then
966cef
         [[ -d /usr/lib ]] && libdirs+=" /usr/lib"
966cef
     fi
966cef
 
966cef
-    libdirs+="$(ldconfig_paths)"
966cef
+    libdirs+=" $(ldconfig_paths)"
966cef
 
966cef
     export libdirs
966cef
 fi