summaryrefslogtreecommitdiffstats
path: root/meta/classes/base.bbclass
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-12-13 20:09:37 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-14 12:30:49 +0000
commit5942a8dc7c0a7f157e4023201c66c0cf7f91550b (patch)
tree2ad850f7c460b56f65eafb49867b0701aea33466 /meta/classes/base.bbclass
parent70ce5952373cedc1620a9c2d1e1348ab972124cb (diff)
downloadpoky-5942a8dc7c0a7f157e4023201c66c0cf7f91550b.tar.gz
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. (From OE-Core rev: 1c99d74a862f25e23ea6465fab7ddc9ce74d6974) 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>
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r--meta/classes/base.bbclass5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 024fe4331a..19673e6913 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -98,6 +98,9 @@ def get_lic_checksum_file_list(d):
98 filelist = [] 98 filelist = []
99 lic_files = d.getVar("LIC_FILES_CHKSUM", True) or '' 99 lic_files = d.getVar("LIC_FILES_CHKSUM", True) or ''
100 tmpdir = d.getVar("TMPDIR", True) 100 tmpdir = d.getVar("TMPDIR", True)
101 s = d.getVar("S", True)
102 b = d.getVar("B", True)
103 workdir = d.getVar("WORKDIR", True)
101 104
102 urls = lic_files.split() 105 urls = lic_files.split()
103 for url in urls: 106 for url in urls:
@@ -109,7 +112,7 @@ def get_lic_checksum_file_list(d):
109 raise bb.fetch.MalformedUrl(url) 112 raise bb.fetch.MalformedUrl(url)
110 113
111 if path[0] == '/': 114 if path[0] == '/':
112 if path.startswith(tmpdir): 115 if path.startswith((tmpdir, s, b, workdir)):
113 continue 116 continue
114 filelist.append(path + ":" + str(os.path.exists(path))) 117 filelist.append(path + ":" + str(os.path.exists(path)))
115 except bb.fetch.MalformedUrl: 118 except bb.fetch.MalformedUrl: