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

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