public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "'Felix Moessbauer' via isar-users" <isar-users@googlegroups.com>
To: isar-users@googlegroups.com
Cc: wzh@ilbers.de, Felix Moessbauer <felix.moessbauer@siemens.com>
Subject: [PATCH 2/3] apt-fetcher: cache sources under the chroot's base distro
Date: Wed, 21 Oct 2026 12:25:43 +0200	[thread overview]
Message-ID: <20261021102544.3614772-3-felix.moessbauer@siemens.com> (raw)
In-Reply-To: <20261021102544.3614772-1-felix.moessbauer@siemens.com>

The apt source fetcher derives the DEBSRCDIR sub-directory from
BASE_DISTRO, which is resolved against OVERRIDES and therefore describes
the recipe's PACKAGE_ARCH rather than the chroot the sources are fetched
in. On raspios, where BASE_DISTRO:arm64 is "raspios64", a native recipe
in mc:rpi-arm64-v8-bookworm caches its .dsc below raspios-bookworm while
base-apt only imports raspios64-bookworm and debian-bookworm for that
multiconfig. The sources are then missing from the cached base
repository and the offline rebuild of the repro test fails in do_unpack.

Use SCHROOT_BASE_DISTRO, which names the base distro of SBUILD_CHROOT.
For native and cross-built recipes this is HOST_BASE_DISTRO, matching
populate_base_apt() in base-apt.bb and deb_dl_dir_import() in
dpkg.bbclass.

Fixes: 37cb017a ("Convert apt source fetcher into native bitbake ...")
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 meta/lib/aptsrc_fetcher.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/lib/aptsrc_fetcher.py b/meta/lib/aptsrc_fetcher.py
index fe8f1cd3..fc3cf363 100644
--- a/meta/lib/aptsrc_fetcher.py
+++ b/meta/lib/aptsrc_fetcher.py
@@ -23,7 +23,9 @@ class AptSrc(FetchMethod):
         ud.src_package = ud.url[len('apt://'):]
         ud.host = ud.host.replace('=', '_')
 
-        base_distro = d.getVar('BASE_DISTRO')
+        # The sources are fetched from inside SBUILD_CHROOT, so they have to be
+        # cached below the base distro of that chroot, not below BASE_DISTRO.
+        base_distro = d.getVar('SCHROOT_BASE_DISTRO')
         codename = d.getVar('BASE_DISTRO_CODENAME')
         ud.localfile='deb-src/' + base_distro + '-' + codename + '/' + ud.host
 
-- 
2.55.0

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20261021102544.3614772-3-felix.moessbauer%40siemens.com.

  parent reply	other threads:[~2026-10-21 10:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-21 10:25 [PATCH 0/3] Fixes for BASE_DISTRO 'Felix Moessbauer' via isar-users
2026-10-21 10:25 ` [PATCH 1/3] crossvars: provide the base distro of the selected sbuild chroot 'Felix Moessbauer' via isar-users
2026-10-21 10:25 ` 'Felix Moessbauer' via isar-users [this message]
2026-10-21 10:25 ` [PATCH 3/3] bootstrap: point cached deb-src at the bootstrapped base distro 'Felix Moessbauer' via isar-users
2026-11-06  9:59 ` [PATCH 0/3] Fixes for BASE_DISTRO 'Moessbauer, Felix' via isar-users
2026-11-06 16:00   ` Zhihang Wei

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=20261021102544.3614772-3-felix.moessbauer@siemens.com \
    --to=isar-users@googlegroups.com \
    --cc=felix.moessbauer@siemens.com \
    --cc=wzh@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