public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Felix Moessbauer <felix.moessbauer@siemens.com>
To: isar-users@googlegroups.com
Cc: jan.kiszka@siemens.com, adriaan.schmidt@siemens.com,
	ubely@ilbers.de, Felix Moessbauer <felix.moessbauer@siemens.com>
Subject: [PATCH(sbuild) 1/1] avoid absolute SCHROOT_* paths to improve caching
Date: Thu, 28 Apr 2022 16:52:22 +0200	[thread overview]
Message-ID: <20220428145222.1872273-2-felix.moessbauer@siemens.com> (raw)
In-Reply-To: <20220428145222.1872273-1-felix.moessbauer@siemens.com>

This patch reworks the logic to setup the SCHROOT_* bitbake
variables by making sure nothing is expanded.
By that, no absolute paths into the build host are exposed,
which finally makes the recipe cachable.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 meta/classes/sbuild.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/classes/sbuild.bbclass b/meta/classes/sbuild.bbclass
index 760a0203..0ea26181 100644
--- a/meta/classes/sbuild.bbclass
+++ b/meta/classes/sbuild.bbclass
@@ -14,11 +14,11 @@ python __anonymous() {
     if mode == "0" or d.getVar('HOST_ARCH') ==  distro_arch or \
        (d.getVar('HOST_DISTRO') == "debian-stretch" and distro_arch == "i386"):
         d.setVar('SBUILD_HOST_ARCH', distro_arch)
-        d.setVar('SCHROOT_DIR', d.getVar('SCHROOT_TARGET_DIR'))
+        d.setVar('SCHROOT_DIR', d.getVar('SCHROOT_TARGET_DIR', False))
         dep = "sbuild-chroot-target:do_build"
     else:
         d.setVar('SBUILD_HOST_ARCH', d.getVar('HOST_ARCH'))
-        d.setVar('SCHROOT_DIR', d.getVar('SCHROOT_HOST_DIR'))
+        d.setVar('SCHROOT_DIR', d.getVar('SCHROOT_HOST_DIR', False))
         dep = "sbuild-chroot-host:do_build"
     d.setVar('SCHROOT_DEP', dep)
 }
-- 
2.30.2


      reply	other threads:[~2022-04-28 14:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28 14:52 [PATCH(sbuild) 0/1] " Felix Moessbauer
2022-04-28 14:52 ` Felix Moessbauer [this message]

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=20220428145222.1872273-2-felix.moessbauer@siemens.com \
    --to=felix.moessbauer@siemens.com \
    --cc=adriaan.schmidt@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.com \
    --cc=ubely@ilbers.de \
    /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