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

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