aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-03-18 14:18:07 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-03-22 04:04:41 +0100
commit888edecd1b34a4f23e000e08f88a81e43f95732e (patch)
treede9a91a321aec629fe9065dc785da51125e2d5b7 /contrib
parentd91b6bc42319db7799cf9188f7150f807ed41163 (diff)
downloadopenembedded-888edecd1b34a4f23e000e08f88a81e43f95732e.tar.gz
oe_audit.py: Properly handle used version..
There might be a third column for -s and we want to use that one. It seems bitbake is a bit confused about latest vs. current... and it is helping.
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/qa/oe_audit.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/contrib/qa/oe_audit.py b/contrib/qa/oe_audit.py
index 905f1108d3..bb7915b5f2 100755
--- a/contrib/qa/oe_audit.py
+++ b/contrib/qa/oe_audit.py
@@ -11,16 +11,22 @@ def read_available(filename):
packages = {}
for line in f:
- if line.startswith("NOTE: ") or line.startswith("Parsing .bb"):
+ if line.startswith("NOTE: ") or line.startswith("Parsing .bb") or line.startswith("done."):
continue
# str.split can not be used as we have multiple whitespace
- first_space = line.find(" ")
- package = line[0:first_space]
- rest = line[first_space+1:]
- pv = rest.strip().split(" ")[0]
-
- packages[package] = pv
+ split = line.split(" ", 1)
+ package = split[0]
+ rest = split[1].strip()
+
+ # we might have a latest package...
+ split = rest.split(" ", 1)
+ if len(split) == 2:
+ version = split[1].strip()
+ else:
+ version = split[0]
+
+ packages[package] = version
return packages