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>
This commit is contained in:
Stefan Herbrechtsmeier 2021-12-15 17:08:10 +01:00 committed by Richard Purdie
parent ed5d621cba
commit 2be34ea6ed

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