summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2018-12-21 16:30:13 +0100
committerAndreas K. Hüttel <dilfridge@gentoo.org>2018-12-21 16:30:13 +0100
commit28a3d5f25227223aefe41fdaa74020fafa31397d (patch)
tree80d23b9f8c05454c7be243cdea6da56399012f12
parentm68k: Fix sigaction kernel definition (BZ #23967) (diff)
downloadglibc-28a3d5f25227223aefe41fdaa74020fafa31397d.tar.gz
glibc-28a3d5f25227223aefe41fdaa74020fafa31397d.tar.bz2
glibc-28a3d5f25227223aefe41fdaa74020fafa31397d.zip
[no-patch] Gentoo: do not touch locale-archive when no locales requested in configgentoo/glibc-2.28-6
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
-rwxr-xr-xscripts/gentoo/extra/locale/locale-gen16
1 files changed, 14 insertions, 2 deletions
diff --git a/scripts/gentoo/extra/locale/locale-gen b/scripts/gentoo/extra/locale/locale-gen
index f88c677e7a..87dd30eaac 100755
--- a/scripts/gentoo/extra/locale/locale-gen
+++ b/scripts/gentoo/extra/locale/locale-gen
@@ -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