]> 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)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 17 Jun 2020 10:09:27 +0000 (11:09 +0100)
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>
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: