From 58e52b434bb534577847d9cb705346ad5ee158b1 Mon Sep 17 00:00:00 2001 From: "Ishida, Haruyasu" Date: Mon, 20 Dec 2010 15:37:54 +0100 Subject: [PATCH] Sort the results of findleaves again. Commit d36e945 changed findleaves.py to sort the output files so that the order is deterministic and won't cause spurious build errors when files happen to be listed (and hence read) in different order on e.g. add/remove the makefiles. This correction broke after commit 4820a94 because the conversion to a set with set() in order to remove duplicates came after sort() and potentially altered the order of the elements. This commit fixes makes sure findleaves.py is guaranteed to return a sorted filename list without duplicates. Change-Id: Ifd96d04d45641fe43d4cc4739f78a2d4d25cc212 --- tools/findleaves.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/findleaves.py b/tools/findleaves.py index 0adf188f9..52c4d9fab 100755 --- a/tools/findleaves.py +++ b/tools/findleaves.py @@ -89,9 +89,9 @@ def main(argv): usage() dirlist = argv[i:-1] filename = argv[-1] - results = perform_find(mindepth, prune, dirlist, filename) + results = list(set(perform_find(mindepth, prune, dirlist, filename))) results.sort() - for r in set(results): + for r in results: print r if __name__ == "__main__":