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

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