summaryrefslogtreecommitdiffstats
path: root/meta/classes/image_types.bbclass
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2017-01-25 12:07:48 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-28 23:32:16 +0000
commit46ed698f052f954e53328f81dc01221ac38a2031 (patch)
tree77d5c5a47f00a25ef7b60fb470721b70bd38561e /meta/classes/image_types.bbclass
parentdeaef6c879bcb452c4a548e839448d1ddf4df1d7 (diff)
downloadpoky-46ed698f052f954e53328f81dc01221ac38a2031.tar.gz
image_types.bbclass: rebuild .wks file when .wks.in changes
WKS_FILE(S) can refer to .wks.in files which get expanded during the build by do_write_wks_template. The actual content of the .wks.in file gets added to the recipe meta data during parsing, and thus we need to ensure that the recipe gets re-parsed when the file changes. This fixes two related problems: - editing the .wks.in file and rebuilding an image did not recreate the image unless something else changed or "bitbake -c clean" was used explicitly - when forcing a rebuild, the cached meta data and the actual one do not match, leading to "ERROR: Taskhash mismatch ... for ....bb.do_write_wks_template" (From OE-Core rev: d00b95b18237b276c221b16dfc511a6da150ef06) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/image_types.bbclass')
-rw-r--r--meta/classes/image_types.bbclass4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 5b1746a68c..50545d9fdf 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -265,6 +265,10 @@ python () {
265 d.setVar('WKS_TEMPLATE_PATH', wks_file_u) 265 d.setVar('WKS_TEMPLATE_PATH', wks_file_u)
266 d.setVar('WKS_FILE_CHECKSUM', '${WKS_TEMPLATE_PATH}:True') 266 d.setVar('WKS_FILE_CHECKSUM', '${WKS_TEMPLATE_PATH}:True')
267 267
268 # We need to re-parse each time the file changes, and bitbake
269 # needs to be told about that explicitly.
270 bb.parse.mark_dependency(d, wks_file)
271
268 try: 272 try:
269 with open(wks_file, 'r') as f: 273 with open(wks_file, 'r') as f:
270 body = f.read() 274 body = f.read()