From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 732591384B4 for ; Wed, 11 Nov 2015 06:17:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 30B5721C037; Wed, 11 Nov 2015 06:17:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4BB9B21C005 for ; Wed, 11 Nov 2015 06:17:00 +0000 (UTC) Received: from [IPv6:2a02:8109:a640:180c:5ee0:c5ff:fe8e:77db] (unknown [IPv6:2a02:8109:a640:180c:5ee0:c5ff:fe8e:77db]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: patrick) by smtp.gentoo.org (Postfix) with ESMTPSA id 1A59033E2EB for ; Wed, 11 Nov 2015 06:16:57 +0000 (UTC) Subject: Re: [gentoo-dev] [RFC] ban use of base-4 casemods in ebuilds due to locale collation instability To: gentoo-dev@lists.gentoo.org References: <20151110235311.GR5154@vapier.lan> <20151111025145.GU5154@vapier.lan> From: Patrick Lauer Message-ID: <5642DD4A.3090700@gentoo.org> Date: Wed, 11 Nov 2015 07:16:42 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 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 In-Reply-To: <20151111025145.GU5154@vapier.lan> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Archives-Salt: a7542bf0-56a0-43d7-866b-38d0764dc9a1 X-Archives-Hash: 4337e5c636d3a6426bf143d43be0e75f On 11/11/2015 03:51 AM, Mike Frysinger wrote: > On 10 Nov 2015 18:53, Mike Frysinger wrote: >> i randomly stumbled across an ebuild that was using ^^ to make a variable >> uppercase. this is new to bash-4.0 and thus invalid for EAPI=[0-5]. only >> the fresh EAPI=6 permits it since we bumped the min ver to bash-4.2. > Arfrever highlights these are not even safe to use. bash is locale aware, > so it'll apply LC_COLLATE rules when processing the ^/, casemods. while > you can fix this with external programs ala: > LC_COLLATE=C tr ... > > you can't do it with inline code like: > LC_COLLATE=C SRC_URI=".../${PN^^}/..." > > you can if you do something like: > SRC_URI=".../$(LC_COLLATE=C; echo "${PN^^}")/..." > This points out a class of problems we've hit in the past: locale-aware things in ebuilds. Wouldn't it be 'easier' (fsov easy) to have portage use sane-default locale settings, so that estonian or turkish users don't get hit by weirdness in the [a-z] character class etc.? (And as a side-effect the build logs are always readable ;) )