From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2E81013835A for ; Tue, 12 May 2020 04:23:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 388DCE089E; Tue, 12 May 2020 04:23:08 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1EABDE089E for ; Tue, 12 May 2020 04:23:08 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 84D0E34FE46 for ; Tue, 12 May 2020 04:23:06 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 10437235 for ; Tue, 12 May 2020 04:23:04 +0000 (UTC) From: "Andreas K. Hüttel" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas K. Hüttel" Message-ID: <1589256724.3f617b2cc378016b4eaa458151b809487af54c8a.dilfridge@gentoo> Subject: [gentoo-commits] proj/locale-gen:master commit in: / X-VCS-Repository: proj/locale-gen X-VCS-Files: locale-gen X-VCS-Directories: / X-VCS-Committer: dilfridge X-VCS-Committer-Name: Andreas K. Hüttel X-VCS-Revision: 3f617b2cc378016b4eaa458151b809487af54c8a X-VCS-Branch: master Date: Tue, 12 May 2020 04:23:04 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: ddaba0aa-a577-488c-9c9f-253094b77b7e X-Archives-Hash: 7040cb1aea2431d8f43e68ca82928a0a commit: 3f617b2cc378016b4eaa458151b809487af54c8a Author: Andreas K. Hüttel gentoo org> AuthorDate: Fri Dec 21 15:30:13 2018 +0000 Commit: Andreas K. Hüttel gentoo org> CommitDate: Tue May 12 04:12:04 2020 +0000 URL: https://gitweb.gentoo.org/proj/locale-gen.git/commit/?id=3f617b2c 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 gentoo.org> locale-gen | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/locale-gen b/locale-gen index f88c677..87dd30e 100755 --- a/locale-gen +++ b/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