diff options
author | 2018-12-21 16:30:13 +0100 | |
---|---|---|
committer | 2020-05-12 07:12:04 +0300 | |
commit | 3f617b2cc378016b4eaa458151b809487af54c8a (patch) | |
tree | bf64cb4a6a3c071a12d1d2171fb0a71ccf7eecaf | |
parent | locale-gen: Always build the C.UTF-8 locale (which we now patch in) (diff) | |
download | locale-gen-3f617b2cc378016b4eaa458151b809487af54c8a.tar.gz locale-gen-3f617b2cc378016b4eaa458151b809487af54c8a.tar.bz2 locale-gen-3f617b2cc378016b4eaa458151b809487af54c8a.zip |
locale-gen: do not touch locale-archive when no locales requested in config
Originally 3179a4df4ea81aa9116b70e2a064f55da65d13e8, gentoo/glibc-9999-10
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
-rwxr-xr-x | locale-gen | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -72,6 +72,7 @@ JOBS_MAX="" QUIET=0 SET_X="" LOCALE_ARCHIVE=true +CUTF_ADDED="" while [[ $# -gt 0 ]] ; do case $1 in -k|--keep|--keep-existing) KEEP=$1;; @@ -183,13 +184,24 @@ if [[ -z ${locales_to_generate} ]] && [[ -e ${CONFIG} ]] ; then fi if echo ${locales_to_generate} | grep -vq 'C.UTF-8' ; then - locales_to_generate=$(echo "${locales_to_generate}" ; echo "C.UTF-8 UTF-8") + if [[ -z ${locales_to_generate} ]] ; then + locales_to_generate='C.UTF-8 UTF-8' + else + locales_to_generate=$(echo "${locales_to_generate}" ; echo -n 'C.UTF-8 UTF-8') + fi + CUTF_ADDED="true" fi fi if [[ -z ${locales_to_generate} ]] ; then [[ ${QUIET} -eq 0 ]] && [[ -z ${JUST_LIST} ]] && \ - ewarn "No locales found" + ewarn "No locales found, keeping locale archive" + exit 0 +fi + +if [[ ${locales_to_generate} == "C.UTF-8 UTF-8" ]] && [[ -n ${CUTF_ADDED} ]] ; then + [[ ${QUIET} -eq 0 ]] && [[ -z ${JUST_LIST} ]] && \ + ewarn "No locales found, keeping locale archive" exit 0 fi |