summaryrefslogtreecommitdiffstats
path: root/pym/portage/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/portage/util.py')
-rw-r--r--pym/portage/util.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/pym/portage/util.py b/pym/portage/util.py
index 39abcd81e..deda2e2c3 100644
--- a/pym/portage/util.py
+++ b/pym/portage/util.py
@@ -1058,3 +1058,17 @@ def new_protect_filename(mydest, newmd5=None):
os.path.join(real_dirname, last_pfile)) == newmd5:
return old_pfile
return new_pfile
+
+def getlibpaths():
+ """ 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.append("/usr/lib")
+ rval.append("/lib")
+
+ rval = [normalize_path(x) for x in rval if x != ""]
+
+ return rval
+