[3/3] bootstrap: point cached deb-src at the bootstrapped base distro

Message ID 20261021102544.3614772-4-felix.moessbauer@siemens.com
State New
Headers show
Series Fixes for BASE_DISTRO | expand

Commit Message

Felix Moessbauer Oct. 21, 2026, 10:25 a.m. UTC
The sources.list we generate for ISAR_USE_CACHED_BASE_REPO builds mixes
two different base distros: the deb entry refers to
BOOTSTRAP_BASE_DISTRO, while the deb-src entry refers to BASE_DISTRO.

For every distro where HOST_BASE_DISTRO equals BASE_DISTRO (debian,
ubuntu) both expand to the same value and the bug is invisible. For
raspios they differ: isar-mmdebstrap-host is bootstrapped from the
'debian' base repository, but its only deb-src entry points at the
'raspios64' one. Native recipes are built in the resulting
sbuild-chroot-host, so their do_unpack runs apt-get source against a
repository that holds neither the host sources nor an index apt can
use, and fails with

  E: You must put some 'deb-src' URIs in your sources.list

Use BOOTSTRAP_BASE_DISTRO for both entries, so that a bootstrap always
sees the binary and the source side of the very repository it is
bootstrapped from.

Fixes: b311a67f ("meta: Add mmdebstrap recipe")
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
(cherry picked from commit 52b478de80058928872630ac61182db02301e042)
---
 meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc b/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc
index 6135da4f..ef718a26 100644
--- a/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc
+++ b/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc
@@ -165,7 +165,7 @@  do_bootstrap() {
             line="[trusted=yes] ${line}"
         fi
         echo "deb ${line}" >  "${WORKDIR}/sources.list.d/base-apt.list"
-        line="copy://$base_apt_tmp/${BASE_DISTRO} ${BASE_DISTRO_CODENAME} main"
+        line="copy://$base_apt_tmp/${BOOTSTRAP_BASE_DISTRO} ${BASE_DISTRO_CODENAME} main"
         if [ -z "${BASE_REPO_KEY}" ]; then
             line="[trusted=yes] ${line}"
         fi