summaryrefslogtreecommitdiff
path: root/meta/lib
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-03-20 16:06:25 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-21 14:16:12 +0000
commitf72b2a1bda35a99292063c1cc6ff563b397e190d (patch)
tree2aa6c1e1dc9eaedc5a42eb3b19aaaadbedcfd465 /meta/lib
parentde21a483063d9803c4ce1d62b03913ccad2931bd (diff)
downloadopenembedded-core-f72b2a1bda35a99292063c1cc6ff563b397e190d.tar.gz
openembedded-core-f72b2a1bda35a99292063c1cc6ff563b397e190d.tar.bz2
openembedded-core-f72b2a1bda35a99292063c1cc6ff563b397e190d.tar.xz
openembedded-core-f72b2a1bda35a99292063c1cc6ff563b397e190d.zip
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. 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.py51
1 files changed, 47 insertions, 4 deletions
diff --git a/meta/lib/oe/buildhistory_analysis.py b/meta/lib/oe/buildhistory_analysis.py
index c0fa339e3..a828f2842 100644
--- a/meta/lib/oe/buildhistory_analysis.py
+++ b/meta/lib/oe/buildhistory_analysis.py
@@ -55,8 +55,7 @@ class ChangeRecord:
else:
prefix = ''
- def pkglist_split(pkgs):
- depver = bb.utils.explode_dep_versions(pkgs)
+ def pkglist_combine(depver):
pkglist = []
for k,v in depver.iteritems():
if v:
@@ -67,8 +66,9 @@ class ChangeRecord:
if self.fieldname in list_fields or self.fieldname in list_order_fields:
if self.fieldname in ['RDEPENDS', 'RRECOMMENDS']:
- aitems = pkglist_split(self.oldvalue)
- bitems = pkglist_split(self.newvalue)
+ (depvera, depverb) = compare_pkg_lists(self.oldvalue, self.newvalue)
+ aitems = pkglist_combine(depvera)
+ bitems = pkglist_combine(depverb)
else:
aitems = self.oldvalue.split()
bitems = self.newvalue.split()
@@ -239,6 +239,45 @@ def compare_lists(alines, blines):
return filechanges
+def split_version(s):
+ """Split a version string into its constituent parts (PE, PV, PR)
+ FIXME: this is a duplicate of a new function in bitbake/lib/bb/utils -
+ we should switch to that once we can bump the minimum bitbake version
+ """
+ s = s.strip(" <>=")
+ e = 0
+ if s.count(':'):
+ e = int(s.split(":")[0])
+ s = s.split(":")[1]
+ r = ""
+ if s.count('-'):
+ r = s.rsplit("-", 1)[1]
+ s = s.rsplit("-", 1)[0]
+ v = s
+ return (e, v, r)
+
+
+def compare_pkg_lists(astr, bstr):
+ depvera = bb.utils.explode_dep_versions(astr)
+ depverb = bb.utils.explode_dep_versions(bstr)
+
+ # Strip out changes where the version has increased
+ remove = []
+ for k in depvera:
+ if k in depverb:
+ dva = depvera[k]
+ dvb = depverb[k]
+ if dva != dvb:
+ if bb.utils.vercmp(split_version(dva), split_version(dvb)) < 0:
+ remove.append(k)
+
+ for k in remove:
+ depvera.pop(k)
+ depverb.pop(k)
+
+ return (depvera, depverb)
+
+
def compare_dict_blobs(path, ablob, bblob, report_all):
adict = blob_to_dict(ablob)
bdict = blob_to_dict(bblob)
@@ -259,6 +298,10 @@ def compare_dict_blobs(path, ablob, bblob, report_all):
if percentchg < monitor_numeric_threshold:
continue
elif (not report_all) and key in list_fields:
+ if key in ['RDEPENDS', 'RRECOMMENDS']:
+ (depvera, depverb) = compare_pkg_lists(astr, bstr)
+ if depvera == depverb:
+ continue
alist = astr.split()
alist.sort()
blist = bstr.split()