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:59:38 +0000 |
commit | 5aec33be7256025a028d4d399d69532aa2b8e940 (patch) | |
tree | bab937890ac4f565ec37621f33e3c4012ca56706 /meta/lib | |
parent | 79eb4b8fdbabd89bdd4f043e82514186fde92080 (diff) | |
download | poky-5aec33be7256025a028d4d399d69532aa2b8e940.tar.gz |
buildhistory_analysis: correctly split RDEPENDS/RRECOMMENDS
Split RDEPENDS and RRECOMMENDS correctly (which may contain version
number specifications after each item).
(From OE-Core rev: d974ed4330f33c4f8dfd635a83c61a0d44e688b6)
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 | 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 | |||
12 | import os.path | 12 | import os.path |
13 | import difflib | 13 | import difflib |
14 | import git | 14 | import git |
15 | import re | ||
15 | 16 | ||
16 | 17 | ||
17 | # How to display fields | 18 | # How to display fields |
@@ -53,9 +54,18 @@ class ChangeRecord: | |||
53 | else: | 54 | else: |
54 | prefix = '' | 55 | prefix = '' |
55 | 56 | ||
57 | def pkglist_split(pkgs): | ||
58 | pkgit = re.finditer(r'[a-zA-Z0-9.+-]+( \([><=]+ [^ )]+\))?', pkgs, 0) | ||
59 | pkglist = [p.group(0) for p in pkgit] | ||
60 | return pkglist | ||
61 | |||
56 | if self.fieldname in list_fields or self.fieldname in list_order_fields: | 62 | if self.fieldname in list_fields or self.fieldname in list_order_fields: |
57 | aitems = self.oldvalue.split() | 63 | if self.fieldname in ['RDEPENDS', 'RRECOMMENDS']: |
58 | bitems = self.newvalue.split() | 64 | aitems = pkglist_split(self.oldvalue) |
65 | bitems = pkglist_split(self.newvalue) | ||
66 | else: | ||
67 | aitems = self.oldvalue.split() | ||
68 | bitems = self.newvalue.split() | ||
59 | removed = list(set(aitems) - set(bitems)) | 69 | removed = list(set(aitems) - set(bitems)) |
60 | added = list(set(bitems) - set(aitems)) | 70 | added = list(set(bitems) - set(aitems)) |
61 | if removed or added: | 71 | if removed or added: |