recipetool: fix duplicate licenses being picked up
If a license file matched more than one of the specifications (e.g. COPYING.GPL) then it was being added to LIC_FILES_CHKSUM more than once. (From OE-Core rev: 58316a2890782d206e9b9472ba483367f7560109) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
4a8fec9bdd
commit
0a45ccb253
|
@ -310,7 +310,9 @@ def guess_license(srctree):
|
|||
for fn in files:
|
||||
for spec in licspecs:
|
||||
if fnmatch.fnmatch(fn, spec):
|
||||
licfiles.append(os.path.join(root, fn))
|
||||
fullpath = os.path.join(root, fn)
|
||||
if not fullpath in licfiles:
|
||||
licfiles.append(fullpath)
|
||||
for licfile in licfiles:
|
||||
md5value = bb.utils.md5_file(licfile)
|
||||
license = md5sums.get(md5value, 'Unknown')
|
||||
|
|
Loading…
Reference in New Issue