[PATCH 1/2] mmdebstrap: drop orphan upload of APTSRCS_INIT to /etc/apt/sources-list

2 views
Skip to first unread message

Clara Kowalsky

unread,
Jun 1, 2026, 10:16:10 AM (2 days ago) Jun 1
to isar-...@googlegroups.com, jan.k...@siemens.com, Clara Kowalsky
The path /etc/apt/sources-list (not dot) is not read by apt. The only
consumer was a fallback in image.bbclass do_rootfs_finalize that moved
the file to /etc/apt/sources.list.d/bootstrap.list when the directory
was empty after debootstrap. That fallback was removed in commit
d58332b2 ("bootstrap: remove isar-bootstrap support").
Mmdebstrap writes bootstrap.list itself. The leftover hook just ships an
unused file in every rootfs.

Signed-off-by: Clara Kowalsky <clara.k...@siemens.com>
---
meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc | 1 -
1 file changed, 1 deletion(-)

diff --git a/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc b/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc
index 6c2cb170..cef953ef 100644
--- a/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc
+++ b/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc
@@ -229,7 +229,6 @@ do_bootstrap() {
--setup-hook='mkdir -p "$1/var/cache/apt/archives/"' \
--setup-hook="$extra_setup" \
--setup-hook='upload "${APTPREFS}" /etc/apt/preferences.d/bootstrap' \
- --setup-hook='upload "${APTSRCS_INIT}" /etc/apt/sources-list' \
--setup-hook='upload "${WORKDIR}/locale" /etc/locale' \
--setup-hook='mkdir -p "$1/etc/apt/trusted.gpg.d"' \
--setup-hook='sync-in "${WORKDIR}/trusted.gpg.d" /etc/apt/trusted.gpg.d' \
--
2.54.0

Clara Kowalsky

unread,
Jun 1, 2026, 10:16:20 AM (2 days ago) Jun 1
to isar-...@googlegroups.com, jan.k...@siemens.com, Clara Kowalsky
Its last consumer, the mmdebstrap setup hook uploading the file to
/etc/apt/sources-init, was removed in commit "mmdebstrap: drop
orphan upload of APTSRCS_INIT to /etc/apt/sources-list", leaving dead
code that wastes a do_apt_config_prepare write on every bootstrap.

Signed-off-by: Clara Kowalsky <clara.k...@siemens.com>
---
meta/classes-recipe/bootstrap.bbclass | 3 ---
1 file changed, 3 deletions(-)

diff --git a/meta/classes-recipe/bootstrap.bbclass b/meta/classes-recipe/bootstrap.bbclass
index 03014cb8..51cd2517 100644
--- a/meta/classes-recipe/bootstrap.bbclass
+++ b/meta/classes-recipe/bootstrap.bbclass
@@ -16,7 +16,6 @@ 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 ?= ""
@@ -222,10 +221,8 @@ 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
--
2.54.0

Reply all
Reply to author
Forward
0 new messages