[oe-commits] Paul Eggleton : recipetool: fix duplicate licenses being picked up

git at git.openembedded.org git at git.openembedded.org
Fri Mar 20 10:59:18 UTC 2015


Module: openembedded-core.git
Branch: master-next
Commit: 7c4acf08fef6fb3132dcc32f143a45476f3bf92d
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=7c4acf08fef6fb3132dcc32f143a45476f3bf92d

Author: Paul Eggleton <paul.eggleton at linux.intel.com>
Date:   Sun Mar  8 21:41:18 2015 +0000

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 at linux.intel.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>

---

 scripts/lib/recipetool/create.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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')



More information about the Openembedded-commits mailing list