diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2012-03-20 16:06:24 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-21 14:16:05 +0000 |
commit | de21a483063d9803c4ce1d62b03913ccad2931bd (patch) | |
tree | 7628f756eeaa06dad02f1e23e690cd84428867df /meta/lib | |
parent | 0d9fc8185945328837aa1a3d9d705afa56856853 (diff) | |
download | openembedded-core-de21a483063d9803c4ce1d62b03913ccad2931bd.tar.gz openembedded-core-de21a483063d9803c4ce1d62b03913ccad2931bd.tar.bz2 openembedded-core-de21a483063d9803c4ce1d62b03913ccad2931bd.tar.xz openembedded-core-de21a483063d9803c4ce1d62b03913ccad2931bd.zip |
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.
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.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/meta/lib/oe/buildhistory_analysis.py b/meta/lib/oe/buildhistory_analysis.py index d09911cb0..c0fa339e3 100644 --- a/meta/lib/oe/buildhistory_analysis.py +++ b/meta/lib/oe/buildhistory_analysis.py @@ -13,6 +13,7 @@ import os.path import difflib import git import re +import bb.utils # How to display fields @@ -55,8 +56,13 @@ class ChangeRecord: prefix = '' def pkglist_split(pkgs): - pkgit = re.finditer(r'[a-zA-Z0-9.+-]+( \([><=]+ [^ )]+\))?', pkgs, 0) - pkglist = [p.group(0) for p in pkgit] + depver = bb.utils.explode_dep_versions(pkgs) + pkglist = [] + for k,v in depver.iteritems(): + if v: + pkglist.append("%s (%s)" % (k,v)) + else: + pkglist.append(k) return pkglist if self.fieldname in list_fields or self.fieldname in list_order_fields: @@ -68,6 +74,7 @@ class ChangeRecord: bitems = self.newvalue.split() removed = list(set(aitems) - set(bitems)) added = list(set(bitems) - set(aitems)) + if removed or added: out = '%s:%s%s' % (self.fieldname, ' removed "%s"' % ' '.join(removed) if removed else '', ' added "%s"' % ' '.join(added) if added else '') else: |