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 v2 3/4] isar-bootstrap: no absolute paths in SRC_URI
Date: Tue, 12 Apr 2022 14:08:12 +0200	[thread overview]
Message-ID: <20220412120813.467516-4-adriaan.schmidt@siemens.com> (raw)
In-Reply-To: <20220412120813.467516-1-adriaan.schmidt@siemens.com>

Having absolute paths in SRC_URI breaks sstate caching.
So we don't use resolve_file (which searches BBPATH and returns an absolute
path), but instead append the search path to FILESEXTRAPATHS and let the fetcher
find the files.

Note that there is no risk of finding/caching the wrong file, as in addition
to the path in SRC_URI, also the file contents are hashed.

Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
---
 meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
index a6e370e3..145d5e87 100644
--- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
+++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
@@ -29,6 +29,7 @@ DISTRO_BOOTSTRAP_BASE_PACKAGES_append_gnupg = ",gnupg"
 DISTRO_BOOTSTRAP_BASE_PACKAGES_append_https-support = "${@https_support(d)}"
 DISTRO_VARS_PREFIX ?= "${@'HOST_' if d.getVar('BOOTSTRAP_FOR_HOST') == '1' else ''}"
 BOOTSTRAP_DISTRO = "${@d.getVar('HOST_DISTRO' if d.getVar('BOOTSTRAP_FOR_HOST') == '1' else 'DISTRO')}"
+FILESEXTRAPATHS_append = ":${BBPATH}"
 
 inherit deb-dl-dir
 
@@ -60,11 +61,11 @@ python () {
 
     distro_apt_sources = d.getVar(d.getVar("DISTRO_VARS_PREFIX") + "DISTRO_APT_SOURCES", True) or ""
     for file in distro_apt_sources.split():
-        d.appendVar("SRC_URI", " file://%s" % bb.parse.resolve_file(file, d))
+        d.appendVar("SRC_URI", " file://%s" % file)
 
     distro_apt_preferences = d.getVar(d.getVar("DISTRO_VARS_PREFIX") + "DISTRO_APT_PREFERENCES", True) or ""
     for file in distro_apt_preferences.split():
-        d.appendVar("SRC_URI", " file://%s" % bb.parse.resolve_file(file, d))
+        d.appendVar("SRC_URI", " file://%s" % file)
 }
 
 def aggregate_files(d, file_list, file_out):
-- 
2.30.2


  parent reply	other threads:[~2022-04-12 12:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-12 12:08 [PATCH v2 0/4] Improve cacheability Adriaan Schmidt
2022-04-12 12:08 ` [PATCH v2 1/4] bitbake.conf: always start with empty SRC_URI Adriaan Schmidt
2022-04-12 12:08 ` [PATCH v2 2/4] bitbake.conf: add isar paths to BB_HASHBASE_WHITELIST Adriaan Schmidt
2022-04-12 12:08 ` Adriaan Schmidt [this message]
2022-04-12 12:08 ` [PATCH v2 4/4] base.bbclass: don't pass absolute paths to root_cleandirs Adriaan Schmidt
2022-05-04  7:50 ` [PATCH v2 0/4] Improve cacheability 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=20220412120813.467516-4-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