summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oe/package.py')
-rw-r--r--meta/lib/oe/package.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index f8b532220a..ea6feaaea4 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -97,3 +97,29 @@ def filedeprunner(arg):
97 raise e 97 raise e
98 98
99 return (pkg, provides, requires) 99 return (pkg, provides, requires)
100
101
102def read_shlib_providers(d):
103 import re
104
105 shlib_provider = {}
106 shlibs_dirs = d.getVar('SHLIBSDIRS', True).split()
107 list_re = re.compile('^(.*)\.list$')
108 # Go from least to most specific since the last one found wins
109 for dir in reversed(shlibs_dirs):
110 bb.debug(2, "Reading shlib providers in %s" % (dir))
111 if not os.path.exists(dir):
112 continue
113 for file in os.listdir(dir):
114 m = list_re.match(file)
115 if m:
116 dep_pkg = m.group(1)
117 fd = open(os.path.join(dir, file))
118 lines = fd.readlines()
119 fd.close()
120 for l in lines:
121 s = l.strip().split(":")
122 if s[0] not in shlib_provider:
123 shlib_provider[s[0]] = {}
124 shlib_provider[s[0]][s[1]] = (dep_pkg, s[2])
125 return shlib_provider