From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A7CEA15827B for ; Fri, 22 Aug 2025 23:12:49 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 95003340E93 for ; Fri, 22 Aug 2025 23:12:49 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id AB4EE110565; Fri, 22 Aug 2025 23:12:38 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 9CAAF110564 for ; Fri, 22 Aug 2025 23:12:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5501F340D91 for ; Fri, 22 Aug 2025 23:12:38 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9DBF234D3 for ; Fri, 22 Aug 2025 23:12:35 +0000 (UTC) From: "Kerin Millar" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Kerin Millar" Message-ID: <1755902686.d9a99681c4fa8f11010087ae938752d489be2223.kfm@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: kfm X-VCS-Committer-Name: Kerin Millar X-VCS-Revision: d9a99681c4fa8f11010087ae938752d489be2223 X-VCS-Branch: master Date: Fri, 22 Aug 2025 23:12:35 +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: b0d1cb66-fd98-4043-829f-039174b3db3e X-Archives-Hash: d7d4984146e2e3e10634246b49a249a8 commit: d9a99681c4fa8f11010087ae938752d489be2223 Author: Kerin Millar plushkava net> AuthorDate: Fri Aug 22 20:42:40 2025 +0000 Commit: Kerin Millar plushkava net> CommitDate: Fri Aug 22 22:44:46 2025 +0000 URL: https://gitweb.gentoo.org/proj/locale-gen.git/commit/?id=d9a99681 Compose an array of canonicals before passing to generate_archive() Construct an array of canonical locale names before passing the array as a parameter list to the generate_archive() subroutine. Though the array is not truly needed, this should render the code easier for the casual observer to understand. Signed-off-by: Kerin Millar plushkava.net> locale-gen | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/locale-gen b/locale-gen index 236f8fc..f7812aa 100755 --- a/locale-gen +++ b/locale-gen @@ -112,7 +112,10 @@ umask 0022; generate_locales($opt{'jobs'}, @locales); # Integrate the newly compiled locales into the system's locale archive. - my $size = generate_archive($prefix, $gentoo_prefix, $locale_dir, $opt{'update'}, map +( $_->[2] ), @locales); + my $size = do { + my @canonicals = map +( $_->[2] ), @locales; + generate_archive($prefix, $gentoo_prefix, $locale_dir, $opt{'update'}, @canonicals); + }; my $total = scalar @locales + scalar %installed_by; printf "Successfully installed an archive containing %d locale%s, of %s MiB in size.\n",