diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2006-01-12 22:57:25 +0000 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2006-01-12 22:57:25 +0000 |
commit | 02a43ca809811ef6762c3db6a0b1f53b95d03966 (patch) | |
tree | 5546b1f2d9128b515b15ef498165c1efc6b4a45a /lib | |
parent | 7433c508fe6b772cea492826210a48774d11c68d (diff) | |
download | bitbake-02a43ca809811ef6762c3db6a0b1f53b95d03966.tar.gz |
bitbake/lib/bb/utils.py:
-add explode_deps method to return
a list of package names from a string (RDEPENDS)
Patch courtsey Richard Purdie (rpurdie@openedhand.com)
bitbake/bin/bitbake:
-major overhaul on dependency tracking and improvement
to the previous commit.
Build Runtime Depends and Runtime Recommendations at the
same time as the package is built.
Patch courtsey Richard Purdie (rpurdie@openedhand.com)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bb/utils.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/bb/utils.py b/lib/bb/utils.py index ee8713a2d..e2319aa12 100644 --- a/lib/bb/utils.py +++ b/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 |