summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-03-20 16:06:24 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-21 15:33:06 (GMT)
commit0b8a693fb4154a7efa811178ff166a9d3fb8a211 (patch)
treee4376dfaa746ac27df29cbb8aea4d5e74c3c4135 /meta/lib
parentfb7eeb395402ce6ec923cd4be411de2ddbe61310 (diff)
downloadpoky-0b8a693fb4154a7efa811178ff166a9d3fb8a211.tar.gz
buildhistory_analysis: use bb.utils.explode_dep_versions
Previously this had its own implementation of splitting a list of packages with optional version e.g. "libncurses-dev (>= 5.9)"; switch to using the already existing bitbake function which does this as it is much better tested. (From OE-Core rev: de21a483063d9803c4ce1d62b03913ccad2931bd) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/buildhistory_analysis.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/meta/lib/oe/buildhistory_analysis.py b/meta/lib/oe/buildhistory_analysis.py
index d09911c..c0fa339 100644
--- a/meta/lib/oe/buildhistory_analysis.py
+++ b/meta/lib/oe/buildhistory_analysis.py
@@ -13,6 +13,7 @@ import os.path
13import difflib 13import difflib
14import git 14import git
15import re 15import re
16import bb.utils
16 17
17 18
18# How to display fields 19# How to display fields
@@ -55,8 +56,13 @@ class ChangeRecord:
55 prefix = '' 56 prefix = ''
56 57
57 def pkglist_split(pkgs): 58 def pkglist_split(pkgs):
58 pkgit = re.finditer(r'[a-zA-Z0-9.+-]+( \([><=]+ [^ )]+\))?', pkgs, 0) 59 depver = bb.utils.explode_dep_versions(pkgs)
59 pkglist = [p.group(0) for p in pkgit] 60 pkglist = []
61 for k,v in depver.iteritems():
62 if v:
63 pkglist.append("%s (%s)" % (k,v))
64 else:
65 pkglist.append(k)
60 return pkglist 66 return pkglist
61 67
62 if self.fieldname in list_fields or self.fieldname in list_order_fields: 68 if self.fieldname in list_fields or self.fieldname in list_order_fields:
@@ -68,6 +74,7 @@ class ChangeRecord:
68 bitems = self.newvalue.split() 74 bitems = self.newvalue.split()
69 removed = list(set(aitems) - set(bitems)) 75 removed = list(set(aitems) - set(bitems))
70 added = list(set(bitems) - set(aitems)) 76 added = list(set(bitems) - set(aitems))
77
71 if removed or added: 78 if removed or added:
72 out = '%s:%s%s' % (self.fieldname, ' removed "%s"' % ' '.join(removed) if removed else '', ' added "%s"' % ' '.join(added) if added else '') 79 out = '%s:%s%s' % (self.fieldname, ' removed "%s"' % ' '.join(removed) if removed else '', ' added "%s"' % ' '.join(added) if added else '')
73 else: 80 else: