[oe-commits] [openembedded-core] 09/18: classes/base: fix license file checksumming when source not under TMPDIR

git at git.openembedded.org git at git.openembedded.org
Wed Dec 14 09:57:23 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 1c99d74a862f25e23ea6465fab7ddc9ce74d6974
Author: Paul Eggleton <paul.eggleton at linux.intel.com>
AuthorDate: Tue Dec 13 20:09:37 2016 +1300

    classes/base: fix license file checksumming when source not under TMPDIR
    
    With the changes to the code for extracting source for a recipe, we are
    properly executing the tasks for a recipe, which means their stamps (and
    therefore signatures) are important. When running devtool extract on
    the lsof recipe I noticed that do_fetch and do_unpack were executing a
    second time when we called for do_patch, and this turned out to be
    because LIC_FILES_CHKSUM in that recipe contains an entry which
    is an absolute path (has ${S} at the start). Normally this wouldn't be
    an issue since S is under TMPDIR and thus the existing code would ignore
    it, however devtool's extraction code extracts to a temporary directory
    which is not under TMPDIR; the result was the path to this file was not
    being ignored and the second time around when the license file had been
    extracted it was incorporated into the signature. We don't want this, so
    explicitly exclude S as well as B and WORKDIR for good measure.
    
    Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/classes/base.bbclass | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 024fe43..19673e6 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -98,6 +98,9 @@ def get_lic_checksum_file_list(d):
     filelist = []
     lic_files = d.getVar("LIC_FILES_CHKSUM", True) or ''
     tmpdir = d.getVar("TMPDIR", True)
+    s = d.getVar("S", True)
+    b = d.getVar("B", True)
+    workdir = d.getVar("WORKDIR", True)
 
     urls = lic_files.split()
     for url in urls:
@@ -109,7 +112,7 @@ def get_lic_checksum_file_list(d):
                 raise bb.fetch.MalformedUrl(url)
 
             if path[0] == '/':
-                if path.startswith(tmpdir):
+                if path.startswith((tmpdir, s, b, workdir)):
                     continue
                 filelist.append(path + ":" + str(os.path.exists(path)))
         except bb.fetch.MalformedUrl:

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list