summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/utils.py')
-rw-r--r--bitbake/lib/bb/utils.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index ee8713a2d0..e2319aa123 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -69,3 +69,27 @@ def vercmp(ta, tb):
69 if (r == 0): 69 if (r == 0):
70 r = vercmp_part(ra, rb) 70 r = vercmp_part(ra, rb)
71 return r 71 return r
72
73def explode_deps(s):
74 """
75 Take an RDEPENDS style string of format:
76 "DEPEND1 (optional version) DEPEND2 (optional version) ..."
77 and return a list of dependencies.
78 Version information is ignored.
79 """
80 r = []
81 l = s.split()
82 flag = False
83 for i in l:
84 if i[0] == '(':
85 flag = True
86 j = []
87 if flag:
88 j.append(i)
89 if i.endswith(')'):
90 flag = False
91 # Ignore version
92 #r[-1] += ' ' + ' '.join(j)
93 else:
94 r.append(i)
95 return r