mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
install: run install in a neutral C.UTF-8 locale
Fresh installs (and SSH sessions that forward LC_* variables from the client) can reference an ungenerated locale, causing apt/perl/python to emit "Cannot set LC_CTYPE to default locale" warnings throughout the install log. Export LC_ALL=C.UTF-8 for the install run. C.UTF-8 is built into glibc, always present, and locale-neutral, so it silences the warnings without generating a locale, without adding a dependency, and without changing the user's configured locale (e.g. an en_GB.UTF-8 system stays en_GB.UTF-8). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ec2b584429
commit
f3a9a9f67c
2 changed files with 14 additions and 0 deletions
|
|
@ -4,6 +4,13 @@ echo "Debian 12 install start: $(date '+%Y-%m-%d %H:%M:%S')"
|
|||
set -x
|
||||
set -e
|
||||
|
||||
# Run the install in a predictable UTF-8 locale. Fresh images (or SSH sessions
|
||||
# forwarding LC_* variables from the client) may reference an ungenerated
|
||||
# locale, which makes apt/perl/python emit "Cannot set LC_CTYPE" warnings
|
||||
# throughout the install. C.UTF-8 is built into glibc, always present, and
|
||||
# locale-neutral, so this does not change the user's configured locale.
|
||||
export LC_ALL=C.UTF-8
|
||||
|
||||
# Update if we haven't updated in the last day.
|
||||
[ -z "$(find -H /var/lib/apt/lists -maxdepth 0 -mtime -1)" ] && apt update
|
||||
# Install dependencies.
|
||||
|
|
|
|||
|
|
@ -4,6 +4,13 @@ echo "Raspberry Pi OS install start: $(date '+%Y-%m-%d %H:%M:%S')"
|
|||
set -x
|
||||
set -e
|
||||
|
||||
# Run the install in a predictable UTF-8 locale. Fresh images (or SSH sessions
|
||||
# forwarding LC_* variables from the client) may reference an ungenerated
|
||||
# locale, which makes apt/perl/python emit "Cannot set LC_CTYPE" warnings
|
||||
# throughout the install. C.UTF-8 is built into glibc, always present, and
|
||||
# locale-neutral, so this does not change the user's configured locale.
|
||||
export LC_ALL=C.UTF-8
|
||||
|
||||
# Update if we haven't updated in the last day.
|
||||
[ -z "$(find -H /var/lib/apt/lists -maxdepth 0 -mtime -1)" ] && apt update
|
||||
# Install dependencies.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue