From 62dc8f47b3c17cf0b1a5d4bf4f0173d5d4fb4c1a Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 10 Feb 2006 10:11:32 +0000 Subject: Update bitbake to latest bitbake svn git-svn-id: https://svn.o-hand.com/repos/poky/trunk@262 311d38ba-8fff-0310-9ca6-ca027cbcb966 --- bitbake/lib/bb/utils.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'bitbake/lib/bb/utils.py') 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): if (r == 0): r = vercmp_part(ra, rb) return r + +def explode_deps(s): + """ + Take an RDEPENDS style string of format: + "DEPEND1 (optional version) DEPEND2 (optional version) ..." + and return a list of dependencies. + Version information is ignored. + """ + r = [] + l = s.split() + flag = False + for i in l: + if i[0] == '(': + flag = True + j = [] + if flag: + j.append(i) + if i.endswith(')'): + flag = False + # Ignore version + #r[-1] += ' ' + ' '.join(j) + else: + r.append(i) + return r -- cgit v1.2.3-54-g00ecf