diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2012-03-20 16:06:25 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-21 15:33:06 +0000 |
commit | 9d8e5ab47a7edf8ef72dcec77b000e43bb1d293f (patch) | |
tree | 8d89b8c945aa25552d1cf60aa38aee0038b945c5 /meta/lib | |
parent | 0b8a693fb4154a7efa811178ff166a9d3fb8a211 (diff) | |
download | poky-9d8e5ab47a7edf8ef72dcec77b000e43bb1d293f.tar.gz |
buildhistory_analysis: hide version number increases in dependencies
If an item in RDEPENDS or RRECOMMENDS only increases in its version
number then don't report it as a change, since we don't care about
it. This significantly reduces the noise after upgrades.
(From OE-Core rev: f72b2a1bda35a99292063c1cc6ff563b397e190d)
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 | 51 |
1 files changed, 47 insertions, 4 deletions
diff --git a/meta/lib/oe/buildhistory_analysis.py b/meta/lib/oe/buildhistory_analysis.py index c0fa339e36..a828f28421 100644 --- a/meta/lib/oe/buildhistory_analysis.py +++ b/meta/lib/oe/buildhistory_analysis.py | |||
@@ -55,8 +55,7 @@ class ChangeRecord: | |||
55 | else: | 55 | else: |
56 | prefix = '' | 56 | prefix = '' |
57 | 57 | ||
58 | def pkglist_split(pkgs): | 58 | def pkglist_combine(depver): |
59 | depver = bb.utils.explode_dep_versions(pkgs) | ||
60 | pkglist = [] | 59 | pkglist = [] |
61 | for k,v in depver.iteritems(): | 60 | for k,v in depver.iteritems(): |
62 | if v: | 61 | if v: |
@@ -67,8 +66,9 @@ class ChangeRecord: | |||
67 | 66 | ||
68 | if self.fieldname in list_fields or self.fieldname in list_order_fields: | 67 | if self.fieldname in list_fields or self.fieldname in list_order_fields: |
69 | if self.fieldname in ['RDEPENDS', 'RRECOMMENDS']: | 68 | if self.fieldname in ['RDEPENDS', 'RRECOMMENDS']: |
70 | aitems = pkglist_split(self.oldvalue) | 69 | (depvera, depverb) = compare_pkg_lists(self.oldvalue, self.newvalue) |
71 | bitems = pkglist_split(self.newvalue) | 70 | aitems = pkglist_combine(depvera) |
71 | bitems = pkglist_combine(depverb) | ||
72 | else: | 72 | else: |
73 | aitems = self.oldvalue.split() | 73 | aitems = self.oldvalue.split() |
74 | bitems = self.newvalue.split() | 74 | bitems = self.newvalue.split() |
@@ -239,6 +239,45 @@ def compare_lists(alines, blines): | |||
239 | return filechanges | 239 | return filechanges |
240 | 240 | ||
241 | 241 | ||
242 | def split_version(s): | ||
243 | """Split a version string into its constituent parts (PE, PV, PR) | ||
244 | FIXME: this is a duplicate of a new function in bitbake/lib/bb/utils - | ||
245 | we should switch to that once we can bump the minimum bitbake version | ||
246 | """ | ||
247 | s = s.strip(" <>=") | ||
248 | e = 0 | ||
249 | if s.count(':'): | ||
250 | e = int(s.split(":")[0]) | ||
251 | s = s.split(":")[1] | ||
252 | r = "" | ||
253 | if s.count('-'): | ||
254 | r = s.rsplit("-", 1)[1] | ||
255 | s = s.rsplit("-", 1)[0] | ||
256 | v = s | ||
257 | return (e, v, r) | ||
258 | |||
259 | |||
260 | def compare_pkg_lists(astr, bstr): | ||
261 | depvera = bb.utils.explode_dep_versions(astr) | ||
262 | depverb = bb.utils.explode_dep_versions(bstr) | ||
263 | |||
264 | # Strip out changes where the version has increased | ||
265 | remove = [] | ||
266 | for k in depvera: | ||
267 | if k in depverb: | ||
268 | dva = depvera[k] | ||
269 | dvb = depverb[k] | ||
270 | if dva != dvb: | ||
271 | if bb.utils.vercmp(split_version(dva), split_version(dvb)) < 0: | ||
272 | remove.append(k) | ||
273 | |||
274 | for k in remove: | ||
275 | depvera.pop(k) | ||
276 | depverb.pop(k) | ||
277 | |||
278 | return (depvera, depverb) | ||
279 | |||
280 | |||
242 | def compare_dict_blobs(path, ablob, bblob, report_all): | 281 | def compare_dict_blobs(path, ablob, bblob, report_all): |
243 | adict = blob_to_dict(ablob) | 282 | adict = blob_to_dict(ablob) |
244 | bdict = blob_to_dict(bblob) | 283 | bdict = blob_to_dict(bblob) |
@@ -259,6 +298,10 @@ def compare_dict_blobs(path, ablob, bblob, report_all): | |||
259 | if percentchg < monitor_numeric_threshold: | 298 | if percentchg < monitor_numeric_threshold: |
260 | continue | 299 | continue |
261 | elif (not report_all) and key in list_fields: | 300 | elif (not report_all) and key in list_fields: |
301 | if key in ['RDEPENDS', 'RRECOMMENDS']: | ||
302 | (depvera, depverb) = compare_pkg_lists(astr, bstr) | ||
303 | if depvera == depverb: | ||
304 | continue | ||
262 | alist = astr.split() | 305 | alist = astr.split() |
263 | alist.sort() | 306 | alist.sort() |
264 | blist = bstr.split() | 307 | blist = bstr.split() |