public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Uladzimir Bely <ubely@ilbers.de>
To: isar-users@googlegroups.com
Subject: [PATCH 3/3] isar-bootstrap: Avoid absolute paths in SRC_URI
Date: Thu, 14 Sep 2023 12:43:13 +0200	[thread overview]
Message-ID: <20230914104313.30231-4-ubely@ilbers.de> (raw)
In-Reply-To: <20230914104313.30231-1-ubely@ilbers.de>

After commit ae3c091c, absolute path to source list file appears in
SRC_URI for isar-bootstrap tasks.

This leads to broken SSTATE_DIR sharing between different instances of
isar on the same machine, since almost all tasks depend on bootstrap
one.

This patch fixes the issue by leaving relative paths returned by
get_aptsources_list() function.

Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
 meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
index 8af73a9b..3477c2fb 100644
--- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
+++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
@@ -152,19 +152,17 @@ def get_aptsources_list(d):
     from collections import OrderedDict
     apt_sources_var = d.getVar("DISTRO_VARS_PREFIX") + "DISTRO_APT_SOURCES"
     apt_sources_list = list(OrderedDict.fromkeys((d.getVar(apt_sources_var) or "").split()))
-    ret = []
     for p in apt_sources_list:
         try:
-            f = bb.parse.resolve_file(p, d)
-            ret.append(f)
+            bb.parse.resolve_file(p, d)
         except FileNotFoundError as e:
             bb.fatal(os.strerror(errno.ENOENT) + ' "' + p + '"')
-    return ret
+    return apt_sources_list
 
 def generate_distro_sources(d):
     apt_sources_list = get_aptsources_list(d)
     for entry in apt_sources_list:
-        with open(entry, "r") as in_fd:
+        with open(bb.parse.resolve_file(entry, d), "r") as in_fd:
             for line in in_fd:
                 parsed = parse_aptsources_list_line(line)
                 if parsed:
-- 
2.20.1


  parent reply	other threads:[~2023-09-14 10:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-14 10:43 [PATCH 0/3] Improve testsuite and fix bootstrap sstate issue Uladzimir Bely
2023-09-14 10:43 ` [PATCH 1/3] testsuite: Allow using custom isar location in test initialization Uladzimir Bely
2023-09-14 10:43 ` [PATCH 2/3] testsuite: Rework cache populating of sstate-cache in SstateTest Uladzimir Bely
2023-09-14 10:43 ` Uladzimir Bely [this message]
2023-09-19  4:18 ` [PATCH 0/3] Improve testsuite and fix bootstrap sstate issue Uladzimir Bely

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=20230914104313.30231-4-ubely@ilbers.de \
    --to=ubely@ilbers.de \
    --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