[2/4] bootstrap: avoid leading space in locale config

Message ID 20260915093258.1818604-3-felix.moessbauer@siemens.com
State Under Review
Headers show
Series Rework locale generation | expand

Commit Message

Felix Moessbauer Sept. 15, 2026, 9:32 a.m. UTC
The selectable locales are per-default commented out. During bootstrap,
we comment the desired ones in again, however this results in a trailing
space before the locale. As of now, this technically does not make a
difference, but locale also does not document that format (leading
space) is actually supported.

We now strip the leading space.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 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 70c2151a..6135da4f 100644
--- a/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc
+++ b/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc
@@ -257,7 +257,7 @@  do_bootstrap() {
                    --extract-hook="$extra_extract" \
                    --essential-hook="$extra_essential" \
                    --customize-hook="$extra_customize" \
-                   --customize-hook='sed -i "/en_US.UTF-8 UTF-8/s/^#//g" "$1/etc/locale.gen"' \
+                   --customize-hook='sed -i "/en_US.UTF-8 UTF-8/s/^# *//g" "$1/etc/locale.gen"' \
                    --customize-hook='chroot "$1" /usr/sbin/locale-gen' \
                    --customize-hook='chroot "$1" /usr/bin/apt-get -y clean' \
                    --customize-hook='echo nameserver 127.0.0.1 > "$1"/etc/resolv.conf' \