public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Adriaan Schmidt <adriaan.schmidt@siemens.com>
To: <isar-users@googlegroups.com>
Cc: Adriaan Schmidt <adriaan.schmidt@siemens.com>
Subject: [PATCH 1/3] image: set convenience variables in bitbake code
Date: Tue, 19 Jul 2022 14:39:52 +0200	[thread overview]
Message-ID: <20220719123954.310076-2-adriaan.schmidt@siemens.com> (raw)
In-Reply-To: <20220719123954.310076-1-adriaan.schmidt@siemens.com>

Moving these variable assignments from Python code into regular
bitbake variables gives us tracking of their dependencies in signatures.

Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
---
 meta/classes/image.bbclass | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 7eeed7db..0688b021 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -154,6 +154,11 @@ IMGCLASSES = "imagetypes imagetypes_wic imagetypes_vm imagetypes_container"
 IMGCLASSES += "${IMAGE_CLASSES}"
 inherit ${IMGCLASSES}
 
+# convenience variables to be used by CMDs
+IMAGE_FILE_HOST = "${DEPLOY_DIR_IMAGE}/${IMAGE_FULLNAME}.${type}"
+IMAGE_FILE_CHROOT = "${PP_DEPLOY}/${IMAGE_FULLNAME}.${type}"
+SUDO_CHROOT = "sudo chroot ${BUILDCHROOT_DIR}"
+
 # hook up IMAGE_CMD_*
 python() {
     image_types = (d.getVar('IMAGE_FSTYPES') or '').split()
@@ -217,11 +222,6 @@ python() {
         if any([d.getVar(arg) is None for arg in required_args]):
             bb.fatal("IMAGE_TYPE '%s' requires these arguments: %s" % (image_type, ', '.join(required_args)))
 
-        # convenience variables to be used by CMDs
-        localdata.setVar('IMAGE_FILE_HOST', '${DEPLOY_DIR_IMAGE}/${IMAGE_FULLNAME}.${type}')
-        localdata.setVar('IMAGE_FILE_CHROOT', '${PP_DEPLOY}/${IMAGE_FULLNAME}.${type}')
-        localdata.setVar('SUDO_CHROOT', localdata.expand('sudo chroot ${BUILDCHROOT_DIR}'))
-
         # imager install
         for dep in (d.getVar('IMAGER_INSTALL_' + bt_clean) or '').split():
             imager_install.add(dep)
-- 
2.30.2


  reply	other threads:[~2022-07-19 12:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-19 12:39 [PATCH 0/3] image and buildchroot tweaks Adriaan Schmidt
2022-07-19 12:39 ` Adriaan Schmidt [this message]
2022-07-19 12:39 ` [PATCH 2/3] buildchroot: delay expansion of variable BUILDCHROOT_DIR Adriaan Schmidt
2022-07-19 12:39 ` [PATCH 3/3] sstate: remove paths below TMPDIR from BB_HASHBASE_WHITELIST Adriaan Schmidt
2022-07-26  6:53 ` [PATCH 0/3] image and buildchroot tweaks Anton Mikanovich

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=20220719123954.310076-2-adriaan.schmidt@siemens.com \
    --to=adriaan.schmidt@siemens.com \
    --cc=isar-users@googlegroups.com \
    /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