aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-07-22 15:13:01 +1200
committerPaul Eggleton <paul.eggleton@linux.intel.com>2016-07-25 20:34:01 +1200
commit3affca68f0f7fd7d0bf47b112f40b8c643677c79 (patch)
treedbc4cc5c71fdc77d073c4620be000c2fc538c3b7
parent8faf4545a82941af0020f5d8db3e6ef0dc891629 (diff)
downloadopenembedded-core-contrib-paule/extsdkfixes12-oe.tar.gz
openembedded-core-contrib-paule/extsdkfixes12-oe.tar.bz2
openembedded-core-contrib-paule/extsdkfixes12-oe.zip
classes/buildhistory: ensure eSDK sstate lists sorted secondarily by namepaule/extsdkfixes12-oe
I got fed up with seeing items dance around in sstate-package-sizes.txt in the buildhistory git repo simply because they have the same size. Let's sort the list first by size and then also by name to ensure items with the same size are deterministically sorted. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-rw-r--r--meta/classes/buildhistory.bbclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 943bfc82be..2db9145abd 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -561,11 +561,11 @@ python buildhistory_get_extra_sdkinfo() {
tasksizes[task] = origtotal + fsize
filesizes[fn] = fsize
with open(d.expand('${BUILDHISTORY_DIR_SDK}/sstate-package-sizes.txt'), 'w') as f:
- filesizes_sorted = sorted(filesizes.items(), key=operator.itemgetter(1), reverse=True)
+ filesizes_sorted = sorted(filesizes.items(), key=operator.itemgetter(1, 0), reverse=True)
for fn, size in filesizes_sorted:
f.write('%10d KiB %s\n' % (size, fn))
with open(d.expand('${BUILDHISTORY_DIR_SDK}/sstate-task-sizes.txt'), 'w') as f:
- tasksizes_sorted = sorted(tasksizes.items(), key=operator.itemgetter(1), reverse=True)
+ tasksizes_sorted = sorted(tasksizes.items(), key=operator.itemgetter(1, 0), reverse=True)
for task, size in tasksizes_sorted:
f.write('%10d KiB %s\n' % (size, task))
}