public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] Underscores in USE flags
Date: Fri, 20 Sep 2019 22:28:46 +0200	[thread overview]
Message-ID: <bbdac37fc395b9aadc1968bccd7c7a0eb66d50e3.camel@gentoo.org> (raw)
In-Reply-To: <CAJ0EP43aVMrqQraO+N9L2cH4A4+viEr3qmUpGyeOMEaXWs90+w@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3848 bytes --]

On Fri, 2019-09-20 at 16:18 -0400, Mike Gilbert wrote:
> On Fri, Sep 20, 2019 at 4:03 PM Michał Górny <mgorny@gentoo.org> wrote:
> > On Fri, 2019-09-20 at 13:24 -0400, Mike Gilbert wrote:
> > > On Fri, Sep 20, 2019 at 12:55 PM Michał Górny <mgorny@gentoo.org> wrote:
> > > > On Fri, 2019-09-20 at 12:41 -0400, Mike Gilbert wrote:
> > > > > On Fri, Sep 20, 2019 at 12:11 PM Michał Górny <mgorny@gentoo.org> 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 prohibits
> > > > > > > this except when the USE flag is part of a USE_EXPAND variable.
> > > > > > > 
> > > > > > > https://projects.gentoo.org/pms/7/pms.html#x1-200003.1.4
> > > > > > > 
> > > > > > > I'm not certain when this text was added to PMS, or how many of the
> > > > > > > affected USE flags pre-date this policy.
> > > > > > > 
> > > > > > > Portage seems to have no issue dealing with underscores, so this
> > > > > > > doesn't seem to be solving any technical problem.
> > > > > > > 
> > > > > > > I am pretty sure that renaming a bunch of USE flags will cause some
> > > > > > > amount of end-user confusion, for very little benefit. Is enforcing
> > > > > > > this part of PMS really worth it?
> > > > > > 
> > > > > > And having packages with pretended-USE_EXPAND-that-does-not-work-as-
> > > > > > USE_EXPAND is less confusing to the users?
> > > > > 
> > > > > I doubt users immediately think "USE_EXPAND" when they see an underscore.
> > > > > 
> > > > > Portage's seems fairly unambiguous to me. For example:
> > > > > 
> > > > > % emerge -pv1O app-misc/foo
> > > > > 
> > > > > These are the packages that would be merged, in order:
> > > > > 
> > > > > [ebuild  N     ] app-misc/foo-0::local  USE="-modern_kernel"
> > > > > PYTHON_TARGETS="python3_7" VIDEO_CARDS="radeon" 0 KiB
> > > > > 
> > > > > Total: 1 package (1 new), Size of downloads: 0 KiB
> > > > > 
> > > > > I don't think anyone would mistake "modern_kernel" for a USE_EXPAND
> > > > > value  given the above.
> > > > > 
> > > > 
> > > > 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_EXPAND.
> > > > Expect that they won't work as USE_EXPAND, user typing:
> > > > 
> > > >   AWS_TARGETS="foo bar baz"
> > > > 
> > > > will just wildly confused, and in the end this prefixing is just silly
> > > > and causes the flag names to become awfully long.
> > > 
> > > Ok, so you chery-picked one particularly horrible example. The Portage
> > > output still puts them in USE="" section, though the user probably
> > > won't see that given the massive USE flag list.
> > > 
> > > My point still stands for many of the other packages in the repo that
> > > don't have several dozen flags.
> > > 
> > 
> > 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.
> > 
> > The hyphen variant is already in the majority in global flags.  What's
> > the harm in having local flags match that?
> 
> I'm just trying to minimize pain for people who have flags set in
> make.conf and package.use.
> 

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.

-- 
Best regards,
Michał Górny


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 618 bytes --]

  reply	other threads:[~2019-09-20 20:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-20 15:46 [gentoo-dev] Underscores in USE flags Mike Gilbert
2019-09-20 16:11 ` Michał Górny
2019-09-20 16:41   ` Mike Gilbert
2019-09-20 16:55     ` Michał Górny
2019-09-20 17:24       ` Mike Gilbert
2019-09-20 19:03         ` Haelwenn (lanodan) Monnier
2019-09-20 20:13           ` Mike Gilbert
2019-09-20 20:03         ` Michał Górny
2019-09-20 20:18           ` Mike Gilbert
2019-09-20 20:28             ` Michał Górny [this message]
2019-09-20 20:46 ` Zac Medico
2019-09-20 20:53   ` Michał Górny
2019-09-21  6:43     ` Fabian Groffen
2019-09-21  7:06       ` Michał Górny
2019-09-21  7:34         ` Fabian Groffen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bbdac37fc395b9aadc1968bccd7c7a0eb66d50e3.camel@gentoo.org \
    --to=mgorny@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox