svn path=/main/trunk/; revision=11729
self._dbapi = vardbapi
self._libs = {}
self._obj_properties = {}
- self._defpath = set(getlibpaths())
+ self._defpath = set(getlibpaths(self._dbapi.root))
self._obj_key_cache = {}
class _ObjectKey(object):
return old_pfile
return new_pfile
-def getlibpaths():
+def getlibpaths(root):
""" Return a list of paths that are used for library lookups """
# the following is based on the information from ld.so(8)
rval = os.environ.get("LD_LIBRARY_PATH", "").split(":")
- rval.extend(grabfile("/etc/ld.so.conf"))
+ rval.extend(grabfile(os.path.join(root, "etc", "ld.so.conf")))
rval.append("/usr/lib")
rval.append("/lib")
- rval = [normalize_path(x) for x in rval if x != ""]
-
+ rval = [normalize_path(os.path.join(root, x.lstrip(os.path.sep))) \
+ for x in rval if x]
+
return rval