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 63C79138334 for ; Fri, 20 Sep 2019 20:28:56 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DBB5AE08FC; Fri, 20 Sep 2019 20:28:52 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 8A0E1E08F5 for ; Fri, 20 Sep 2019 20:28:52 +0000 (UTC) Received: from pomiot (c134-66.icpnet.pl [85.221.134.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id EB67034B3F6; Fri, 20 Sep 2019 20:28:50 +0000 (UTC) Message-ID: Subject: Re: [gentoo-dev] Underscores in USE flags From: =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Date: Fri, 20 Sep 2019 22:28:46 +0200 In-Reply-To: References: <5fc919ec85751bd88d4bf0775ba1733584f92dc2.camel@gentoo.org> <20e57b194284c4d20e6781573fd0387257aed9f1.camel@gentoo.org> <22cf484a144a107088af85164dd1fea6028060a0.camel@gentoo.org> Organization: Gentoo Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-ojOvc7pEGzroS4fPk+zZ" User-Agent: Evolution 3.32.4 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 X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 X-Archives-Salt: 60ad9012-ead3-4efa-8bb6-b2865a45299c X-Archives-Hash: b2346f1e4403b3d780099edd78ff40ed --=-ojOvc7pEGzroS4fPk+zZ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2019-09-20 at 16:18 -0400, Mike Gilbert wrote: > On Fri, Sep 20, 2019 at 4:03 PM Micha=C5=82 G=C3=B3rny wrote: > > On Fri, 2019-09-20 at 13:24 -0400, Mike Gilbert wrote: > > > On Fri, Sep 20, 2019 at 12:55 PM Micha=C5=82 G=C3=B3rny wrote: > > > > On Fri, 2019-09-20 at 12:41 -0400, Mike Gilbert wrote: > > > > > On Fri, Sep 20, 2019 at 12:11 PM Micha=C5=82 G=C3=B3rny wrote: > > > > > > On Fri, 2019-09-20 at 11:46 -0400, Mike Gilbert wrote: > > > > > > > Recently, a large number of bugs were filed against packages = that have > > > > > > > USE flag names which contain underscores. Apparently PMS proh= ibits > > > > > > > this except when the USE flag is part of a USE_EXPAND variabl= e. > > > > > > >=20 > > > > > > > https://projects.gentoo.org/pms/7/pms.html#x1-200003.1.4 > > > > > > >=20 > > > > > > > I'm not certain when this text was added to PMS, or how many = of the > > > > > > > affected USE flags pre-date this policy. > > > > > > >=20 > > > > > > > Portage seems to have no issue dealing with underscores, so t= his > > > > > > > doesn't seem to be solving any technical problem. > > > > > > >=20 > > > > > > > I am pretty sure that renaming a bunch of USE flags will caus= e some > > > > > > > amount of end-user confusion, for very little benefit. Is enf= orcing > > > > > > > this part of PMS really worth it? > > > > > >=20 > > > > > > And having packages with pretended-USE_EXPAND-that-does-not-wor= k-as- > > > > > > USE_EXPAND is less confusing to the users? > > > > >=20 > > > > > I doubt users immediately think "USE_EXPAND" when they see an und= erscore. > > > > >=20 > > > > > Portage's seems fairly unambiguous to me. For example: > > > > >=20 > > > > > % emerge -pv1O app-misc/foo > > > > >=20 > > > > > These are the packages that would be merged, in order: > > > > >=20 > > > > > [ebuild N ] app-misc/foo-0::local USE=3D"-modern_kernel" > > > > > PYTHON_TARGETS=3D"python3_7" VIDEO_CARDS=3D"radeon" 0 KiB > > > > >=20 > > > > > Total: 1 package (1 new), Size of downloads: 0 KiB > > > > >=20 > > > > > I don't think anyone would mistake "modern_kernel" for a USE_EXPA= ND > > > > > value given the above. > > > > >=20 > > > >=20 > > > > Look at the humongous list of flags on dev-libs/aws-sdk-cpp. They = all > > > > start with 'aws_targets' which is a clear attempt to emulate USE_EX= PAND. > > > > Expect that they won't work as USE_EXPAND, user typing: > > > >=20 > > > > AWS_TARGETS=3D"foo bar baz" > > > >=20 > > > > will just wildly confused, and in the end this prefixing is just si= lly > > > > and causes the flag names to become awfully long. > > >=20 > > > Ok, so you chery-picked one particularly horrible example. The Portag= e > > > output still puts them in USE=3D"" section, though the user probably > > > won't see that given the massive USE flag list. > > >=20 > > > My point still stands for many of the other packages in the repo that > > > don't have several dozen flags. > > >=20 > >=20 > > I'm sorry to say but you can't expect automated software to be able to > > distinguish a 'not horrible' vs 'horrible' use. The test catches both > > cases. The latter case deserves fixing, the former usually involves 1-= 2 > > flag, so there's no harm in changing it. If for no other reason, then > > to improve consistency in USE flags and save shift key a bit. > >=20 > > The hyphen variant is already in the majority in global flags. What's > > the harm in having local flags match that? >=20 > I'm just trying to minimize pain for people who have flags set in > make.conf and package.use. >=20 I don't see why we couldn't introduce usemove for this purpose. Of course, that's going to work properly only if people don't use wildcards in package.use, and if we rename the flag in all versions simultaneously. --=20 Best regards, Micha=C5=82 G=C3=B3rny --=-ojOvc7pEGzroS4fPk+zZ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQGTBAABCgB9FiEEx2qEUJQJjSjMiybFY5ra4jKeJA4FAl2FNn9fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEM3 NkE4NDUwOTQwOThEMjhDQzhCMjZDNTYzOUFEQUUyMzI5RTI0MEUACgkQY5ra4jKe JA5ZiQgAr6hTrmUfKOAhPoF1Y+pqOpDudaTK1yg9uT6SZt17AFFIWxPATrSLYomK lNG+FvB4moZac1fhzCpMYJDm6mkNpWtv98TXiVbTgMV1zbM0Y6AgE7PFeFPG6nwN owMYbSY0xZXhb//Utj0vYYOC891clVmHmIxde9XRWriq5Fo41CjY1IYWdFOdbjPf D7bWzWmhVVVV8yRjKbTz+lhFeGWEkOr+pc5gzZJg+3ntWNX/e0schn6kZZw1TpjF g2/QJjYsQqT1s6MYC3HBDTxKoMn4uWUfQaIlhwDFn2v/9J+UFvgNhpIktq2AtLAU hcyozVsCXFSKurfp3HZ/ewSWOHi6RQ== =+FIi -----END PGP SIGNATURE----- --=-ojOvc7pEGzroS4fPk+zZ--