relocate packages on recipes-base/recipes-enigma2/recipes-wlan.
[vuplus_openvuplus_3.0] / meta-openvuplus / recipes-devtools / python / python / no-ldconfig.patch
diff --git a/meta-openvuplus/recipes-devtools/python/python/no-ldconfig.patch b/meta-openvuplus/recipes-devtools/python/python/no-ldconfig.patch
new file mode 100644 (file)
index 0000000..fff1ccd
--- /dev/null
@@ -0,0 +1,23 @@
+Fixes exception on 'import uuid' if ldconfig is unavailable.
+
+diff -Naur Python-2.6.7.orig/Lib/ctypes/util.py Python-2.6.7/Lib/ctypes/util.py
+--- Python-2.6.7.orig/Lib/ctypes/util.py       2010-03-20 03:11:16.000000000 +0100
++++ Python-2.6.7/Lib/ctypes/util.py    2012-01-12 15:26:37.562726637 +0100
+@@ -204,7 +204,16 @@
+             return res.group(1)
+         def find_library(name):
+-            return _findSoname_ldconfig(name) or _get_soname(_findLib_gcc(name))
++            from glob import glob
++            paths = ['/lib', '/usr/lib']
++            if os.environ.has_key('LD_LIBRARY_PATH'):
++                paths = os.environ['LD_LIBRARY_PATH'].split(':') + paths
++            for path in paths:
++                for lib in glob("%s/lib%s.so.*" % (path, name)):
++                    rpath = os.path.realpath(lib)
++                    if os.path.isfile(rpath):
++                        return rpath
++            return None
+ ################################################################
+ # test code