diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2016-07-23 00:38:14 +1200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-07-26 08:56:32 +0100 |
commit | dd8540550fc0055cbd66b899ab226ca48e63b4f5 (patch) | |
tree | d92974fc5f982426d243867469076e3392aa05ed /meta/classes/buildhistory.bbclass | |
parent | 82c7d0f2003958a3c5d46f4a39c2a9b03c2af653 (diff) | |
download | poky-dd8540550fc0055cbd66b899ab226ca48e63b4f5.tar.gz |
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>
Diffstat (limited to 'meta/classes/buildhistory.bbclass')
-rw-r--r-- | 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 943bfc82be..2db9145abd 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass | |||
@@ -561,11 +561,11 @@ python buildhistory_get_extra_sdkinfo() { | |||
561 | tasksizes[task] = origtotal + fsize | 561 | tasksizes[task] = origtotal + fsize |
562 | filesizes[fn] = fsize | 562 | filesizes[fn] = fsize |
563 | with open(d.expand('${BUILDHISTORY_DIR_SDK}/sstate-package-sizes.txt'), 'w') as f: | 563 | with open(d.expand('${BUILDHISTORY_DIR_SDK}/sstate-package-sizes.txt'), 'w') as f: |
564 | filesizes_sorted = sorted(filesizes.items(), key=operator.itemgetter(1), reverse=True) | 564 | filesizes_sorted = sorted(filesizes.items(), key=operator.itemgetter(1, 0), reverse=True) |
565 | for fn, size in filesizes_sorted: | 565 | for fn, size in filesizes_sorted: |
566 | f.write('%10d KiB %s\n' % (size, fn)) | 566 | f.write('%10d KiB %s\n' % (size, fn)) |
567 | with open(d.expand('${BUILDHISTORY_DIR_SDK}/sstate-task-sizes.txt'), 'w') as f: | 567 | with open(d.expand('${BUILDHISTORY_DIR_SDK}/sstate-task-sizes.txt'), 'w') as f: |
568 | tasksizes_sorted = sorted(tasksizes.items(), key=operator.itemgetter(1), reverse=True) | 568 | tasksizes_sorted = sorted(tasksizes.items(), key=operator.itemgetter(1, 0), reverse=True) |
569 | for task, size in tasksizes_sorted: | 569 | for task, size in tasksizes_sorted: |
570 | f.write('%10d KiB %s\n' % (size, task)) | 570 | f.write('%10d KiB %s\n' % (size, task)) |
571 | } | 571 | } |