diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2012-02-13 18:14:18 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-02-21 17:49:33 +0000 |
commit | d974ed4330f33c4f8dfd635a83c61a0d44e688b6 (patch) | |
tree | c944e009f50a07238e008dc0d086be44e44b5305 /meta/lib | |
parent | e23c5b01766602c9c86b0a7ba170fb3b1aceb658 (diff) | |
download | openembedded-core-d974ed4330f33c4f8dfd635a83c61a0d44e688b6.tar.gz openembedded-core-d974ed4330f33c4f8dfd635a83c61a0d44e688b6.tar.bz2 openembedded-core-d974ed4330f33c4f8dfd635a83c61a0d44e688b6.zip |
buildhistory_analysis: correctly split RDEPENDS/RRECOMMENDS
Split RDEPENDS and RRECOMMENDS correctly (which may contain version
number specifications after each item).
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oe/buildhistory_analysis.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/meta/lib/oe/buildhistory_analysis.py b/meta/lib/oe/buildhistory_analysis.py index bef6cd4138..4f3e6359c6 100644 --- a/meta/lib/oe/buildhistory_analysis.py +++ b/meta/lib/oe/buildhistory_analysis.py @@ -12,6 +12,7 @@ import sys import os.path import difflib import git +import re # How to display fields @@ -53,9 +54,18 @@ class ChangeRecord: else: prefix = '' + def pkglist_split(pkgs): + pkgit = re.finditer(r'[a-zA-Z0-9.+-]+( \([><=]+ [^ )]+\))?', pkgs, 0) + pkglist = [p.group(0) for p in pkgit] + return pkglist + if self.fieldname in list_fields or self.fieldname in list_order_fields: - aitems = self.oldvalue.split() - bitems = self.newvalue.split() + if self.fieldname in ['RDEPENDS', 'RRECOMMENDS']: + aitems = pkglist_split(self.oldvalue) + bitems = pkglist_split(self.newvalue) + else: + aitems = self.oldvalue.split() + bitems = self.newvalue.split() removed = list(set(aitems) - set(bitems)) added = list(set(bitems) - set(aitems)) if removed or added: |