[gnome-continuous-yocto/gnomeostree-3.28-rocko: 1583/8267] classes/buildhistory: ensure eSDK sstate lists sorted secondarily by name
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 1583/8267] classes/buildhistory: ensure eSDK sstate lists sorted secondarily by name
- Date: Sat, 16 Dec 2017 22:01:51 +0000 (UTC)
commit dd8540550fc0055cbd66b899ab226ca48e63b4f5
Author: Paul Eggleton <paul eggleton linux intel com>
Date: Sat Jul 23 00:38:14 2016 +1200
classes/buildhistory: ensure eSDK sstate lists sorted secondarily by name
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.
(From OE-Core rev: 7340c1ea677731d21351d47d935d9de7d7e2eda5)
Signed-off-by: Paul Eggleton <paul eggleton linux intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
meta/classes/buildhistory.bbclass | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 943bfc8..2db9145 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))
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]