]> code.ossystems Code Review - openembedded-core.git/commitdiff
recipetool: Sort output of guess_license function to be deterministic
authorStefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Wed, 15 Dec 2021 16:08:10 +0000 (17:08 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 20 Dec 2021 15:28:57 +0000 (15:28 +0000)
Sort the output of guess_license function by license file to be
deterministic and to support self-testing.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/recipetool/create.py

index 406c97f1c5682ccc677986cc73a1f9d72f1a1c5d..28224dbc241f1bb451577dac56519e6454e30af6 100644 (file)
@@ -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: