From 0a45ccb253b269d49864934adc2ea02ba2fe3626 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Sun, 8 Mar 2015 21:41:18 +0000 Subject: 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 Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- scripts/lib/recipetool/create.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py index ae599cb..1c71b24 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') -- cgit v1.1