[1/5] Revert "bootstrap: drop unused APTSRCS_INIT"

Message ID 20261203153249.1727469-2-felix.moessbauer@siemens.com
State New
Headers show
Series Do not leak DISTRO_APT_PREMIRRORS into the image | expand

Commit Message

Felix Moessbauer Dec. 3, 2026, 3:32 p.m. UTC
This reverts commit 4cf24ce0fac136bac20434ccb3cecf1b7e38a745.

APTSRCS_INIT holds the apt sources as given in DISTRO_APT_SOURCES,
without DISTRO_APT_PREMIRRORS or snapshot rewrites. It was dropped as
unused, but it is exactly what the final rootfs should ship: the user
manual promises that premirrors are only used during the build. Since
the switch to mmdebstrap, images instead carry the rewritten
0000bootstrap.list.

Restore it so that a following change can make use of it again.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 meta/classes-recipe/bootstrap.bbclass | 3 +++
 1 file changed, 3 insertions(+)

Patch

diff --git a/meta/classes-recipe/bootstrap.bbclass b/meta/classes-recipe/bootstrap.bbclass
index c1a59fd2..86b740d8 100644
--- a/meta/classes-recipe/bootstrap.bbclass
+++ b/meta/classes-recipe/bootstrap.bbclass
@@ -16,6 +16,7 @@  BOOTSTRAP_FOR_HOST ?= "0"
 
 APTPREFS = "${WORKDIR}/apt-preferences"
 APTSRCS = "${WORKDIR}/apt-sources"
+APTSRCS_INIT = "${WORKDIR}/apt-sources-init"
 DISTRO_BOOTSTRAP_KEYFILES = ""
 THIRD_PARTY_APT_KEYFILES = ""
 DISTRO_BOOTSTRAP_KEYS ?= ""
@@ -221,8 +222,10 @@  python do_apt_config_prepare() {
     aggregate_files(d, apt_preferences_list, apt_preferences_out)
 
     apt_sources_out = d.getVar("APTSRCS")
+    apt_sources_init_out = d.getVar("APTSRCS_INIT")
     apt_sources_list = get_aptsources_list(d)
 
+    aggregate_files(d, apt_sources_list, apt_sources_init_out)
     aggregate_aptsources_list(d, apt_sources_list, apt_sources_out)
 }
 addtask apt_config_prepare before do_bootstrap after do_unpack