Blame SOURCES/python-2.7rc1-binutils-no-dep.patch

f992f7
From f188693ef57719c02a9d6927272737fbfb633e4e Mon Sep 17 00:00:00 2001
f992f7
From: Tomas Orsava <torsava@redhat.com>
f992f7
Date: Tue, 10 Jan 2017 15:43:51 +0100
f992f7
Subject: [PATCH] Avoid using objdump to apparently minimize space requirements
f992f7
f992f7
---
f992f7
 Lib/ctypes/util.py | 6 +++++-
f992f7
 1 file changed, 5 insertions(+), 1 deletion(-)
f992f7
f992f7
diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py
f992f7
index ab10ec5..923d1b7 100644
f992f7
--- a/Lib/ctypes/util.py
f992f7
+++ b/Lib/ctypes/util.py
f992f7
@@ -140,11 +140,15 @@ elif os.name == "posix":
f992f7
             # assuming GNU binutils / ELF
f992f7
             if not f:
f992f7
                 return None
f992f7
-            cmd = 'if ! type objdump >/dev/null 2>&1; then exit; fi;' \
f992f7
+            cmd = 'if ! type objdump >/dev/null 2>&1; then exit 10; fi;' \
f992f7
                   'objdump -p -j .dynamic 2>/dev/null "$1"'
f992f7
             proc = subprocess.Popen((cmd, '_get_soname', f), shell=True,
f992f7
                                     stdout=subprocess.PIPE)
f992f7
             [dump, _] = proc.communicate()
f992f7
+            if proc.returncode == 10:
23b3e9
+                return os.path.basename(f) #  This is good for GLibc, I think,
23b3e9
+                                           # and a dep on binutils is big (for
23b3e9
+                                           # live CDs).
f992f7
             res = re.search(br'\sSONAME\s+([^\s]+)', dump)
f992f7
             if not res:
f992f7
                 return None
f992f7
-- 
f992f7
2.11.0
f992f7