]> code.ossystems Code Review - openembedded-core.git/commitdiff
buildhistory-collect-srcrevs: sort directories
authorDan McGregor <danismostlikely@gmail.com>
Mon, 15 Jun 2020 22:01:43 +0000 (16:01 -0600)
committerSteve Sakoman <steve@sakoman.com>
Sun, 21 Jun 2020 03:09:07 +0000 (17:09 -1000)
From: Daniel McGregor <daniel.mcgregor@vecima.com>

In order to allow consistent output of buildhistory-collect-srcrevs sort
the list of directories returned by os.walk. Otherwise the list of
SRCREVs is returned in an unspecified order.

We save the output of this command on build, so it creates smaller diffs
between builds.

Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 3d7cb207ad4ec3cd5a3064147d3c9b5a1730d0fb)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
scripts/buildhistory-collect-srcrevs

index c4d203ff4d950eff187a95c045e56b41591c03bf..340bee78bb1a4ac23f66aa7d4b1a24e8f114673b 100755 (executable)
@@ -59,6 +59,7 @@ def main():
 
     all_srcrevs = collections.defaultdict(list)
     for root, dirs, files in os.walk(options.buildhistory_dir):
+        dirs.sort()
         if '.git' in dirs:
             dirs.remove('.git')
         for fn in files: