From: Felix Moessbauer <felix.moessbauer@siemens.com>
To: isar-users@googlegroups.com
Cc: adriaan.schmidt@siemens.com,
Felix Moessbauer <felix.moessbauer@siemens.com>
Subject: [PATCH 2/2] improve cachability of isar-bootstrap
Date: Tue, 9 Aug 2022 16:07:56 +0200 [thread overview]
Message-ID: <20220809140756.1164520-2-felix.moessbauer@siemens.com> (raw)
In-Reply-To: <20220809140756.1164520-1-felix.moessbauer@siemens.com>
This patch makes all paths used in the bootstrapping relative
to TOPDIR to be able to cache the isar-bootstrap task.
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
index 604cd24c..9f512032 100644
--- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
+++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
@@ -35,8 +35,8 @@ inherit deb-dl-dir
python () {
distro_bootstrap_keys = (d.getVar("DISTRO_BOOTSTRAP_KEYS") or "").split()
-
third_party_apt_keys = (d.getVar("THIRD_PARTY_APT_KEYS") or "").split()
+ topdir = d.getVar("TOPDIR", True)
# The cached repo key can be both for bootstrapping and apt package
# installation afterwards. However, debootstrap will include the key into
@@ -50,14 +50,14 @@ python () {
for key in distro_bootstrap_keys:
d.appendVar("SRC_URI", " %s" % key)
fetcher = bb.fetch2.Fetch([key], d)
- filename = fetcher.localpath(key)
- d.appendVar("DISTRO_BOOTSTRAP_KEYFILES", " %s" % filename)
+ filename = os.path.relpath(fetcher.localpath(key), topdir)
+ d.appendVar("DISTRO_BOOTSTRAP_KEYFILES", "${TOPDIR}/%s" % filename)
for key in third_party_apt_keys:
d.appendVar("SRC_URI", " %s" % key)
fetcher = bb.fetch2.Fetch([key], d)
- filename = fetcher.localpath(key)
- d.appendVar("THIRD_PARTY_APT_KEYFILES", " %s" % filename)
+ filename = os.path.relpath(fetcher.localpath(key), topdir)
+ d.appendVar("THIRD_PARTY_APT_KEYFILES", " ${TOPDIR}/%s" % filename)
distro_apt_sources = d.getVar(d.getVar("DISTRO_VARS_PREFIX") + "DISTRO_APT_SOURCES", True) or ""
for file in distro_apt_sources.split():
--
2.30.2
next prev parent reply other threads:[~2022-08-09 14:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-09 14:07 [PATCH 1/2] isar-sstate lint: strip variable value Felix Moessbauer
2022-08-09 14:07 ` Felix Moessbauer [this message]
2022-08-12 7:30 ` [PATCH 2/2] improve cachability of isar-bootstrap Anton Mikanovich
2022-08-12 8:03 ` Moessbauer, Felix
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=20220809140756.1164520-2-felix.moessbauer@siemens.com \
--to=felix.moessbauer@siemens.com \
--cc=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