summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-03-08 21:41:18 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-20 11:27:49 +0000
commit0a45ccb253b269d49864934adc2ea02ba2fe3626 (patch)
treeee8bb5bb784156ef2985e3931803b2f064024131
parent4a8fec9bdd2661a58d3373779706740254048ab1 (diff)
downloadpoky-0a45ccb253b269d49864934adc2ea02ba2fe3626.tar.gz
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>
-rw-r--r--scripts/lib/recipetool/create.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index ae599cbb70..1c71b24bfb 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -310,7 +310,9 @@ def guess_license(srctree):
310 for fn in files: 310 for fn in files:
311 for spec in licspecs: 311 for spec in licspecs:
312 if fnmatch.fnmatch(fn, spec): 312 if fnmatch.fnmatch(fn, spec):
313 licfiles.append(os.path.join(root, fn)) 313 fullpath = os.path.join(root, fn)
314 if not fullpath in licfiles:
315 licfiles.append(fullpath)
314 for licfile in licfiles: 316 for licfile in licfiles:
315 md5value = bb.utils.md5_file(licfile) 317 md5value = bb.utils.md5_file(licfile)
316 license = md5sums.get(md5value, 'Unknown') 318 license = md5sums.get(md5value, 'Unknown')