Explorar o código

recipetool: Sort output of guess_license function to be deterministic

Sort the output of guess_license function by license file to be
deterministic and to support self-testing.

(From OE-Core rev: ff2a7520813b3f775f96879d1905222e08b8c83f)

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Stefan Herbrechtsmeier %!s(int64=3) %!d(string=hai) anos
pai
achega
2be34ea6ed
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      scripts/lib/recipetool/create.py

+ 1 - 1
scripts/lib/recipetool/create.py

@@ -1201,7 +1201,7 @@ def guess_license(srctree, d):
                     fullpath = os.path.join(root, fn)
                     if not fullpath in licfiles:
                         licfiles.append(fullpath)
-    for licfile in licfiles:
+    for licfile in sorted(licfiles):
         md5value = bb.utils.md5_file(licfile)
         license = md5sums.get(md5value, None)
         if not license: