[oe-commits] Holger Hans Peter Freyther : oe_audit.py: Properly handle used version..

git version control git at git.openembedded.org
Mon Mar 22 06:59:15 UTC 2010


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 888edecd1b34a4f23e000e08f88a81e43f95732e
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=888edecd1b34a4f23e000e08f88a81e43f95732e

Author: Holger Hans Peter Freyther <zecke at selfish.org>
Date:   Thu Mar 18 14:18:07 2010 +0100

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.

---

 contrib/qa/oe_audit.py |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/contrib/qa/oe_audit.py b/contrib/qa/oe_audit.py
index 905f110..bb7915b 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
 
 





More information about the Openembedded-commits mailing list