summaryrefslogtreecommitdiffstats
path: root/meta/lib
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:59:38 +0000
commit79eb4b8fdbabd89bdd4f043e82514186fde92080 (patch)
tree3c4b927b4e4d37276fc21bb85f6c105849aed966 /meta/lib
parente155952b4da47b025c04dcbf00d12daecbc5a44d (diff)
downloadpoky-79eb4b8fdbabd89bdd4f043e82514186fde92080.tar.gz
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. (From OE-Core rev: e23c5b01766602c9c86b0a7ba170fb3b1aceb658) 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.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 103cfb41b1..bef6cd4138 100644
--- a/meta/lib/oe/buildhistory_analysis.py
+++ b/meta/lib/oe/buildhistory_analysis.py
@@ -15,7 +15,8 @@ import git
15 15
16 16
17# How to display fields 17# How to display fields
18list_fields = ['DEPENDS', 'RDEPENDS', 'RRECOMMENDS', 'PACKAGES', 'FILES', 'FILELIST', 'USER_CLASSES', 'IMAGE_CLASSES', 'IMAGE_FEATURES', 'IMAGE_LINGUAS', 'IMAGE_INSTALL', 'BAD_RECOMMENDATIONS'] 18list_fields = ['DEPENDS', 'RDEPENDS', 'RRECOMMENDS', 'FILES', 'FILELIST', 'USER_CLASSES', 'IMAGE_CLASSES', 'IMAGE_FEATURES', 'IMAGE_LINGUAS', 'IMAGE_INSTALL', 'BAD_RECOMMENDATIONS']
19list_order_fields = ['PACKAGES']
19numeric_fields = ['PKGSIZE', 'IMAGESIZE'] 20numeric_fields = ['PKGSIZE', 'IMAGESIZE']
20# Fields to monitor 21# Fields to monitor
21monitor_fields = ['RDEPENDS', 'RRECOMMENDS', 'PACKAGES', 'FILELIST', 'PKGSIZE', 'IMAGESIZE'] 22monitor_fields = ['RDEPENDS', 'RRECOMMENDS', 'PACKAGES', 'FILELIST', 'PKGSIZE', 'IMAGESIZE']
@@ -52,12 +53,15 @@ class ChangeRecord:
52 else: 53 else:
53 prefix = '' 54 prefix = ''
54 55
55 if self.fieldname in list_fields: 56 if self.fieldname in list_fields or self.fieldname in list_order_fields:
56 aitems = self.oldvalue.split() 57 aitems = self.oldvalue.split()
57 bitems = self.newvalue.split() 58 bitems = self.newvalue.split()
58 removed = list(set(aitems) - set(bitems)) 59 removed = list(set(aitems) - set(bitems))
59 added = list(set(bitems) - set(aitems)) 60 added = list(set(bitems) - set(aitems))
60 out = '%s:%s%s' % (self.fieldname, ' removed "%s"' % ' '.join(removed) if removed else '', ' added "%s"' % ' '.join(added) if added else '') 61 if removed or added:
62 out = '%s:%s%s' % (self.fieldname, ' removed "%s"' % ' '.join(removed) if removed else '', ' added "%s"' % ' '.join(added) if added else '')
63 else:
64 out = '%s changed order' % self.fieldname
61 elif self.fieldname in numeric_fields: 65 elif self.fieldname in numeric_fields:
62 aval = int(self.oldvalue or 0) 66 aval = int(self.oldvalue or 0)
63 bval = int(self.newvalue or 0) 67 bval = int(self.newvalue or 0)
@@ -237,6 +241,13 @@ def compare_dict_blobs(path, ablob, bblob, report_all):
237 percentchg = 100 241 percentchg = 100
238 if percentchg < monitor_numeric_threshold: 242 if percentchg < monitor_numeric_threshold:
239 continue 243 continue
244 elif (not report_all) and key in list_fields:
245 alist = astr.split()
246 alist.sort()
247 blist = bstr.split()
248 blist.sort()
249 if ' '.join(alist) == ' '.join(blist):
250 continue
240 chg = ChangeRecord(path, key, astr, bstr, key in monitor_fields) 251 chg = ChangeRecord(path, key, astr, bstr, key in monitor_fields)
241 changes.append(chg) 252 changes.append(chg)
242 return changes 253 return changes