summaryrefslogtreecommitdiff
path: root/meta/lib/oe
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-02-13 18:09:12 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-02-21 17:49:16 +0000
commite23c5b01766602c9c86b0a7ba170fb3b1aceb658 (patch)
treecc4159705a2bd753b302a7bca86adb1be972962a /meta/lib/oe
parentcad533880df42ad4fe6f04d56d3a59cb4a033275 (diff)
downloadopenembedded-core-e23c5b01766602c9c86b0a7ba170fb3b1aceb658.tar.gz
openembedded-core-e23c5b01766602c9c86b0a7ba170fb3b1aceb658.tar.bz2
openembedded-core-e23c5b01766602c9c86b0a7ba170fb3b1aceb658.tar.xz
openembedded-core-e23c5b01766602c9c86b0a7ba170fb3b1aceb658.zip
buildhistory_analysis: avoid noise due to reordering
Avoid noise in the output due to reordering of list variables (except for PACKAGES where we just report that the order changed). Recent changes to the buildhistory class itself will avoid this reordering from occurring but this allows us to examine the results before and after those changes. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'meta/lib/oe')
-rw-r--r--meta/lib/oe/buildhistory_analysis.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/meta/lib/oe/buildhistory_analysis.py b/meta/lib/oe/buildhistory_analysis.py
index 103cfb41b..bef6cd413 100644
--- a/meta/lib/oe/buildhistory_analysis.py
+++ b/meta/lib/oe/buildhistory_analysis.py
@@ -15,7 +15,8 @@ import git
# How to display fields
-list_fields = ['DEPENDS', 'RDEPENDS', 'RRECOMMENDS', 'PACKAGES', 'FILES', 'FILELIST', 'USER_CLASSES', 'IMAGE_CLASSES', 'IMAGE_FEATURES', 'IMAGE_LINGUAS', 'IMAGE_INSTALL', 'BAD_RECOMMENDATIONS']
+list_fields = ['DEPENDS', 'RDEPENDS', 'RRECOMMENDS', 'FILES', 'FILELIST', 'USER_CLASSES', 'IMAGE_CLASSES', 'IMAGE_FEATURES', 'IMAGE_LINGUAS', 'IMAGE_INSTALL', 'BAD_RECOMMENDATIONS']
+list_order_fields = ['PACKAGES']
numeric_fields = ['PKGSIZE', 'IMAGESIZE']
# Fields to monitor
monitor_fields = ['RDEPENDS', 'RRECOMMENDS', 'PACKAGES', 'FILELIST', 'PKGSIZE', 'IMAGESIZE']
@@ -52,12 +53,15 @@ class ChangeRecord:
else:
prefix = ''
- if self.fieldname in list_fields:
+ if self.fieldname in list_fields or self.fieldname in list_order_fields:
aitems = self.oldvalue.split()
bitems = self.newvalue.split()
removed = list(set(aitems) - set(bitems))
added = list(set(bitems) - set(aitems))
- out = '%s:%s%s' % (self.fieldname, ' removed "%s"' % ' '.join(removed) if removed else '', ' added "%s"' % ' '.join(added) if added else '')
+ 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:
+ out = '%s changed order' % self.fieldname
elif self.fieldname in numeric_fields:
aval = int(self.oldvalue or 0)
bval = int(self.newvalue or 0)
@@ -237,6 +241,13 @@ def compare_dict_blobs(path, ablob, bblob, report_all):
percentchg = 100
if percentchg < monitor_numeric_threshold:
continue
+ elif (not report_all) and key in list_fields:
+ alist = astr.split()
+ alist.sort()
+ blist = bstr.split()
+ blist.sort()
+ if ' '.join(alist) == ' '.join(blist):
+ continue
chg = ChangeRecord(path, key, astr, bstr, key in monitor_fields)
changes.append(chg)
return changes