From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.77) (envelope-from ) id 1Ss7kQ-0003rn-U9 for garchives@archives.gentoo.org; Fri, 20 Jul 2012 07:35:39 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AF94BE0691; Fri, 20 Jul 2012 07:35:11 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 5CEF1E067D for ; Fri, 20 Jul 2012 07:33:49 +0000 (UTC) Received: from sera-17.lan (28-57.62-81.cust.bluewin.ch [81.62.57.28]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: sera) by smtp.gentoo.org (Postfix) with ESMTPSA id E957E643ED for ; Fri, 20 Jul 2012 07:33:47 +0000 (UTC) Date: Fri, 20 Jul 2012 09:33:32 +0200 From: Ralph Sennhauser To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] RFC: l10n.eclass Message-ID: <20120720093332.02446725@sera-17.lan> In-Reply-To: References: <20120719151422.1fb9883b@sera-17.lan> Organization: Gentoo Linux X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/+XFk0l0E4B96YCgw4D.9gN7"; protocol="application/pgp-signature" X-Archives-Salt: 6536f7d1-c965-4a8d-ba2a-044da9c8afd8 X-Archives-Hash: e4bc627d3e99a71b7eb095fb893e73c6 --Sig_/+XFk0l0E4B96YCgw4D.9gN7 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Thu, 19 Jul 2012 23:37:32 +0800 Ben de Groot wrote: > I got a few more suggestions on IRC, and I have updated the eclass > accordingly. Please check the attached new version, also available at > https://gitorious.org/gentoo-qt/qt/blobs/master/eclass/l10n.eclass Pseudo inlining > # Add linguas useflags > if [[ -n "${PLOCALES}" ]]; then > for u in ${PLOCALES}; do > IUSE+=3D" linguas_${u}" > done > fi no need to guard the loop against empty $PLOCALES. > l10n_for_each_locale_do() { > local locs x > locs=3D$(l10n_get_locales) > if [[ -n "${locs}" ]]; then > for x in ${locs}; do > ${@} ${x} || die "failed to process enabled > ${x} locale" done > fi > } same here, no guarding required and "${@}" should be quoted as it may contain args with spaces. Also in l10n_for_each_disabled_locale_do. > # ones. This function is normally used internally in this eclass, not > by # l10n.eclass consumers. > l10n_get_locales() { I'd mark this function @INTERNAL then, at least until someone can presents a use case. If you are sufficiently sure this function shouldn't be used by consumers you could remove the function in favour of 'use linguas_${x} || continue' in l10n_for_each_locale_do resp 'use linguas_${x} && continue' in l10n_for_each_disabled_locale_do. --Sig_/+XFk0l0E4B96YCgw4D.9gN7 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQEcBAEBAgAGBQJQCQnVAAoJEIUJ+svaV163sB4IAJLX6iVY/+CRdnuNYUMyMLGj i5G57eAS7lvj+w7GHTvfqxuHNy39aLWPK6LNobvOjJQIwTU/s+PEvOTylY6MLHg3 qehLaRCLf0BA3q5eQcm04RnX47QJrqBKGnwLDi3EER5TLB5YtO6suSJUqKLrR3cP kdS9/WNx9iExW6JZkfwS/EPIz4VJy5DQWX8QA6Jsms8kPMxbbP3sxWtMnsvmxqDN DOtBJH0ySobCwcMoNsdDBSIv8OxEEBiQhp4isw7mNMu2xeBSseSkOlCiKB6oy70l hgqiDSI47642zMeCR5MJYwrY3Tczt3kF6/VU5+9BWJ5/pPf7I92hA99alIYkfsw= =YQ6O -----END PGP SIGNATURE----- --Sig_/+XFk0l0E4B96YCgw4D.9gN7--