From efa03095e06e5e37b0202da3c42fe8bb0a6be028 Mon Sep 17 00:00:00 2001 From: oreo639 Date: Tue, 13 Sep 2022 10:22:19 -0700 Subject: [PATCH] base-files: don't overwrite existing locale and define default LANG --- srcpkgs/base-files/files/locale.sh | 10 ++++++++-- srcpkgs/base-files/template | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/srcpkgs/base-files/files/locale.sh b/srcpkgs/base-files/files/locale.sh index 8486367bfabf..00c625c50838 100644 --- a/srcpkgs/base-files/files/locale.sh +++ b/srcpkgs/base-files/files/locale.sh @@ -1,9 +1,15 @@ # Sets up locale system settings from /etc/locale.conf. # -if [ -s /etc/locale.conf ]; then - . /etc/locale.conf + +if [ -z "$LANG" ]; then + if [ -s /etc/locale.conf ]; then + . /etc/locale.conf + fi fi +# define default LANG to C.UTF-8 if not already defined +LANG="${LANG:-C.UTF-8}" + export LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY export LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT export LC_INDENTIFICATION diff --git a/srcpkgs/base-files/template b/srcpkgs/base-files/template index b96d09351a08..3f2696ba6954 100644 --- a/srcpkgs/base-files/template +++ b/srcpkgs/base-files/template @@ -1,7 +1,7 @@ # Template file for 'base-files' pkgname=base-files version=0.143 -revision=2 +revision=3 bootstrap=yes depends="xbps-triggers" short_desc="Void Linux base system files"