Quellcode durchsuchen

buildhistory-collect-srcrevs: sort directories

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>
Dan McGregor vor 3 Jahren
Ursprung
Commit
3d7cb207ad
1 geänderte Dateien mit 1 neuen und 0 gelöschten Zeilen
  1. 1 0
      scripts/buildhistory-collect-srcrevs

+ 1 - 0
scripts/buildhistory-collect-srcrevs

@@ -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: