Blame SOURCES/0075-dracut-install-dracut-fix-ldd-output-parsing.patch

a56a5e
From cb97abc7bb304a9eb8d6f6c29eaa62e9525117fb Mon Sep 17 00:00:00 2001
966cef
From: Harald Hoyer <harald@redhat.com>
966cef
Date: Fri, 17 Jan 2014 11:52:43 +0100
966cef
Subject: [PATCH] dracut-install,dracut: fix ldd output parsing
966cef
966cef
dracut-install could not handle output like:
966cef
	/lib/$LIB/liblsp.so => /lib/lib64/liblsp.so (0x00007faf00727000)
966cef
966cef
also unset LD_PRELOAD, so we get a clean environment
966cef
---
966cef
 dracut.sh                | 1 +
966cef
 install/dracut-install.c | 6 +++++-
966cef
 2 files changed, 6 insertions(+), 1 deletion(-)
966cef
966cef
diff --git a/dracut.sh b/dracut.sh
1755ca
index cf027e7d..8d572a33 100755
966cef
--- a/dracut.sh
966cef
+++ b/dracut.sh
966cef
@@ -545,6 +545,7 @@ export LC_ALL=C
966cef
 export LANG=C
966cef
 unset NPATH
966cef
 unset LD_LIBRARY_PATH
966cef
+unset LD_PRELOAD
966cef
 unset GREP_OPTIONS
966cef
 
966cef
 export DRACUT_LOG_LEVEL=warning
966cef
diff --git a/install/dracut-install.c b/install/dracut-install.c
1755ca
index 6b9c613b..c5e4b05f 100644
966cef
--- a/install/dracut-install.c
966cef
+++ b/install/dracut-install.c
966cef
@@ -391,7 +391,11 @@ static int resolve_deps(const char *src)
966cef
                 if (strstr(buf, destrootdir))
966cef
                         break;
966cef
 
966cef
-                p = strchr(buf, '/');
966cef
+                p = strstr(buf, "=>");
966cef
+                if (!p)
966cef
+                        p = buf;
966cef
+
966cef
+                p = strchr(p, '/');
966cef
                 if (p) {
966cef
                         for (q = p; *q && *q != ' ' && *q != '\n'; q++) ;
966cef
                         *q = '\0';