From: Patrick Ohly <patrick.ohly@intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] image_types.bbclass: rebuild .wks file when .wks.in changes
Date: Wed, 25 Jan 2017 12:06:25 +0100 [thread overview]
Message-ID: <20170125110625.19909-1-patrick.ohly@intel.com> (raw)
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"
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
---
meta/classes/image_types.bbclass | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 5b1746a68ce..9bc1996cdb0 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -265,6 +265,10 @@ python () {
d.setVar('WKS_TEMPLATE_PATH', wks_file_u)
d.setVar('WKS_FILE_CHECKSUM', '${WKS_TEMPLATE_PATH}:True')
+ # We need to re-parse each time the file changes, and bitbake
+ # needs to be told about that explicitly.
+ # bb.parse.mark_dependency(d, wks_file)
+
try:
with open(wks_file, 'r') as f:
body = f.read()
--
2.11.0
next reply other threads:[~2017-01-25 11:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-25 11:06 Patrick Ohly [this message]
2017-01-25 11:07 ` [PATCH v2] image_types.bbclass: rebuild .wks file when .wks.in changes Patrick Ohly
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170125110625.19909-1-patrick.ohly@intel.com \
--to=patrick.ohly@intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox