[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[lorax] Fix searching for ld_linux executable on 64 bit machines



On some machines we can have more ld_linux executables specified
in /usr/bin/ldd file. This patch fixes how we search for the file.
---
 src/pylorax/sysutils.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/pylorax/sysutils.py b/src/pylorax/sysutils.py
index 6e207de..fd8377e 100644
--- a/src/pylorax/sysutils.py
+++ b/src/pylorax/sysutils.py
@@ -356,11 +356,14 @@ class Linker(object):
                     ld_linux = m.group("ld_linux")
                     break
 
-        if ld_linux is None:
+        if ld_linux:
+            ld_linux = filter(os.path.isfile, ld_linux.split())
+
+        if not ld_linux:
             raise LinkerError("cannot find the ld_linux executable")
 
         self.lddcmd = "LD_LIBRARY_PATH={0} {1} --list"
-        self.lddcmd = self.lddcmd.format(libdirs, ld_linux)
+        self.lddcmd = self.lddcmd.format(libdirs, ld_linux[0])
 
         self.pattern = re.compile(r"^[-._/a-zA-Z0-9]+\s=>\s"
                                   r"(?P<lib>[-._/a-zA-Z0-9]+)"
-- 
1.6.6


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]