aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/lib/recipetool/create.py
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:03:13 +0000
commit58316a2890782d206e9b9472ba483367f7560109 (patch)
tree8dc891f4171e2ccfb9ea75ff5e8147a8cce4b883 /scripts/lib/recipetool/create.py
parentefd46543524db98e4369c1d85a1e1c0e76f12899 (diff)
downloadopenembedded-core-contrib-58316a2890782d206e9b9472ba483367f7560109.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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts/lib/recipetool/create.py')
-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):
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')