public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Underscores in USE flags
@ 2019-09-20 15:46 Mike Gilbert
  2019-09-20 16:11 ` Michał Górny
  2019-09-20 20:46 ` Zac Medico
  0 siblings, 2 replies; 15+ messages in thread
From: Mike Gilbert @ 2019-09-20 15:46 UTC (permalink / raw
  To: Gentoo Dev

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?


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-dev] Underscores in USE flags
  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 20:46 ` Zac Medico
  1 sibling, 1 reply; 15+ messages in thread
From: Michał Górny @ 2019-09-20 16:11 UTC (permalink / raw
  To: gentoo-dev

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

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?

-- 
Best regards,
Michał Górny


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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-dev] Underscores in USE flags
  2019-09-20 16:11 ` Michał Górny
@ 2019-09-20 16:41   ` Mike Gilbert
  2019-09-20 16:55     ` Michał Górny
  0 siblings, 1 reply; 15+ messages in thread
From: Mike Gilbert @ 2019-09-20 16:41 UTC (permalink / raw
  To: Gentoo Dev

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.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-dev] Underscores in USE flags
  2019-09-20 16:41   ` Mike Gilbert
@ 2019-09-20 16:55     ` Michał Górny
  2019-09-20 17:24       ` Mike Gilbert
  0 siblings, 1 reply; 15+ messages in thread
From: Michał Górny @ 2019-09-20 16:55 UTC (permalink / raw
  To: gentoo-dev

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

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.

-- 
Best regards,
Michał Górny


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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-dev] Underscores in USE flags
  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:03         ` Michał Górny
  0 siblings, 2 replies; 15+ messages in thread
From: Mike Gilbert @ 2019-09-20 17:24 UTC (permalink / raw
  To: Gentoo Dev

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.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-dev] Underscores in USE flags
  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
  1 sibling, 1 reply; 15+ messages in thread
From: Haelwenn (lanodan) Monnier @ 2019-09-20 19:03 UTC (permalink / raw
  To: gentoo-dev

[2019-09-20 13:24:45-0400] Mike Gilbert:
> 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.

While that's true for portage, it is false for gentoolkit with the 
`equery u <atom>` command.

Following your original example it would be something like:

% equery y app-misc/foo
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for app-misc/foo-0::local
 U I
 - - modern_kernel            : Install init scripts for 3.18 or higher kernels with atomic rule updates
 + + python_targets_python3_7 : Build with Python 3.7
 - - video_cards_radeon       : VIDEO_CARDS setting to build driver for ATI radeon video cards

And with a bunch more of USE flags (not with having to go to extremes like 
dev-libs/aws-sdk-cpp) it is very confusing a lot of time on machines where 
app-portage/eix would be overkill I had to check on another machine.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-dev] Underscores in USE flags
  2019-09-20 17:24       ` Mike Gilbert
  2019-09-20 19:03         ` Haelwenn (lanodan) Monnier
@ 2019-09-20 20:03         ` Michał Górny
  2019-09-20 20:18           ` Mike Gilbert
  1 sibling, 1 reply; 15+ messages in thread
From: Michał Górny @ 2019-09-20 20:03 UTC (permalink / raw
  To: gentoo-dev

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

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?

-- 
Best regards,
Michał Górny


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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-dev] Underscores in USE flags
  2019-09-20 19:03         ` Haelwenn (lanodan) Monnier
@ 2019-09-20 20:13           ` Mike Gilbert
  0 siblings, 0 replies; 15+ messages in thread
From: Mike Gilbert @ 2019-09-20 20:13 UTC (permalink / raw
  To: Gentoo Dev

On Fri, Sep 20, 2019 at 3:03 PM Haelwenn (lanodan) Monnier
<contact@hacktivis.me> wrote:
>
> [2019-09-20 13:24:45-0400] Mike Gilbert:
> > 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.
>
> While that's true for portage, it is false for gentoolkit with the
> `equery u <atom>` command.
>
> Following your original example it would be something like:
>
> % equery y app-misc/foo
> [ Legend : U - final flag setting for installation]
> [        : I - package is installed with flag     ]
> [ Colors : set, unset                             ]
>  * Found these USE flags for app-misc/foo-0::local
>  U I
>  - - modern_kernel            : Install init scripts for 3.18 or higher kernels with atomic rule updates
>  + + python_targets_python3_7 : Build with Python 3.7
>  - - video_cards_radeon       : VIDEO_CARDS setting to build driver for ATI radeon video cards
>
> And with a bunch more of USE flags (not with having to go to extremes like
> dev-libs/aws-sdk-cpp) it is very confusing a lot of time on machines where
> app-portage/eix would be overkill I had to check on another machine.

Ah, thank you for the example. I imagine equery is used quite
frequently for this sort of thing, so I'll concede the point.

It would be nice if there were some easy way to migrate package.use
settings; that's going to cause some grumbling from sysadmins.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-dev] Underscores in USE flags
  2019-09-20 20:03         ` Michał Górny
@ 2019-09-20 20:18           ` Mike Gilbert
  2019-09-20 20:28             ` Michał Górny
  0 siblings, 1 reply; 15+ messages in thread
From: Mike Gilbert @ 2019-09-20 20:18 UTC (permalink / raw
  To: Gentoo Dev

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.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-dev] Underscores in USE flags
  2019-09-20 20:18           ` Mike Gilbert
@ 2019-09-20 20:28             ` Michał Górny
  0 siblings, 0 replies; 15+ messages in thread
From: Michał Górny @ 2019-09-20 20:28 UTC (permalink / raw
  To: gentoo-dev

[-- 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 --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-dev] Underscores in USE flags
  2019-09-20 15:46 [gentoo-dev] Underscores in USE flags Mike Gilbert
  2019-09-20 16:11 ` Michał Górny
@ 2019-09-20 20:46 ` Zac Medico
  2019-09-20 20:53   ` Michał Górny
  1 sibling, 1 reply; 15+ messages in thread
From: Zac Medico @ 2019-09-20 20:46 UTC (permalink / raw
  To: gentoo-dev, Mike Gilbert


[-- Attachment #1.1: Type: text/plain, Size: 905 bytes --]

On 9/20/19 8:46 AM, 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?

If we take this underscore rule to its logical extreme, then we should
rename python_targets_python3_7 to python_targets_python3-7, yes?
-- 
Thanks,
Zac


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 981 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-dev] Underscores in USE flags
  2019-09-20 20:46 ` Zac Medico
@ 2019-09-20 20:53   ` Michał Górny
  2019-09-21  6:43     ` Fabian Groffen
  0 siblings, 1 reply; 15+ messages in thread
From: Michał Górny @ 2019-09-20 20:53 UTC (permalink / raw
  To: gentoo-dev, Mike Gilbert

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

On Fri, 2019-09-20 at 13:46 -0700, Zac Medico wrote:
> On 9/20/19 8:46 AM, 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?
> 
> If we take this underscore rule to its logical extreme, then we should
> rename python_targets_python3_7 to python_targets_python3-7, yes?

Believe me, I would have done that already if not the fact that with all
the dependency logic around here it would be totally destructive to all
Gentoo systems.

But hey, expect hyphen on 3.8.

-- 
Best regards,
Michał Górny


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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-dev] Underscores in USE flags
  2019-09-20 20:53   ` Michał Górny
@ 2019-09-21  6:43     ` Fabian Groffen
  2019-09-21  7:06       ` Michał Górny
  0 siblings, 1 reply; 15+ messages in thread
From: Fabian Groffen @ 2019-09-21  6:43 UTC (permalink / raw
  To: gentoo-dev

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

On 20-09-2019 22:53:53 +0200, Michał Górny wrote:
> On Fri, 2019-09-20 at 13:46 -0700, Zac Medico wrote:
> > 
> > If we take this underscore rule to its logical extreme, then we should
> > rename python_targets_python3_7 to python_targets_python3-7, yes?
> 
> Believe me, I would have done that already if not the fact that with all
> the dependency logic around here it would be totally destructive to all
> Gentoo systems.

Honestly, with this reasoning, why force other packages to go through
USE-flag renaming in that case?  A major consumer of USE_EXPAND isn't
sticking to the rule, which makes any benefit of it moot.  Tools cannot
assume the last underscore separates the USE_EXPAND var from its value,
users cannot see what is the value either, without knowledge.

Why not teach our tools (equery, quse, etc.) to print these USE-flags
like Portage does?  (looking them up to be valid expands)
Then users have nothing to be confused about (no distinction between
foo_bar and FOO="bar"), and new USE_EXPANDS cannot be
silently/accidentially introduced.

> But hey, expect hyphen on 3.8.

I honestly feel for consistency and not confusing users, we should
either do them all or stick to the current scheme.

Thanks,
Fabian


-- 
Fabian Groffen
Gentoo on a different level

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-dev] Underscores in USE flags
  2019-09-21  6:43     ` Fabian Groffen
@ 2019-09-21  7:06       ` Michał Górny
  2019-09-21  7:34         ` Fabian Groffen
  0 siblings, 1 reply; 15+ messages in thread
From: Michał Górny @ 2019-09-21  7:06 UTC (permalink / raw
  To: gentoo-dev

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

On Sat, 2019-09-21 at 08:43 +0200, Fabian Groffen wrote:
> On 20-09-2019 22:53:53 +0200, Michał Górny wrote:
> > On Fri, 2019-09-20 at 13:46 -0700, Zac Medico wrote:
> > > If we take this underscore rule to its logical extreme, then we should
> > > rename python_targets_python3_7 to python_targets_python3-7, yes?
> > 
> > Believe me, I would have done that already if not the fact that with all
> > the dependency logic around here it would be totally destructive to all
> > Gentoo systems.
> 
> Honestly, with this reasoning, why force other packages to go through
> USE-flag renaming in that case?  A major consumer of USE_EXPAND isn't
> sticking to the rule, which makes any benefit of it moot.  Tools cannot
> assume the last underscore separates the USE_EXPAND var from its value,
> users cannot see what is the value either, without knowledge.

The major consumer is fixable.  Sure, it will take years but that's
better than leaving things wrong forever and saying wrong is good.

> Why not teach our tools (equery, quse, etc.) to print these USE-flags
> like Portage does?  (looking them up to be valid expands)
> Then users have nothing to be confused about (no distinction between
> foo_bar and FOO="bar"), and new USE_EXPANDS cannot be
> silently/accidentially introduced.

I don't see how that solves the problem.  More tools having distinct
output don't change the fact that anyone with a bit of ebuild knowledge
will say 'this looks like USE_EXPAND' while looking at it, independently
of what some tools would say.

-- 
Best regards,
Michał Górny


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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-dev] Underscores in USE flags
  2019-09-21  7:06       ` Michał Górny
@ 2019-09-21  7:34         ` Fabian Groffen
  0 siblings, 0 replies; 15+ messages in thread
From: Fabian Groffen @ 2019-09-21  7:34 UTC (permalink / raw
  To: gentoo-dev

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

On 21-09-2019 09:06:01 +0200, Michał Górny wrote:
> On Sat, 2019-09-21 at 08:43 +0200, Fabian Groffen wrote:
> > Why not teach our tools (equery, quse, etc.) to print these USE-flags
> > like Portage does?  (looking them up to be valid expands)
> > Then users have nothing to be confused about (no distinction between
> > foo_bar and FOO="bar"), and new USE_EXPANDS cannot be
> > silently/accidentially introduced.
> 
> I don't see how that solves the problem.  More tools having distinct
> output don't change the fact that anyone with a bit of ebuild knowledge
> will say 'this looks like USE_EXPAND' while looking at it, independently
> of what some tools would say.

Well... someone with a bit of ebuild knowledge would see odd USE-flags.
USE_EXPAND is a (bad) hack, of having some USE-flags mean something
different, or resolve through something different, while in reality they
really don't do anything odd.  In fact, sometimes users have to use
FOO="bar" (make.conf), while other times foo_bar needs to be used
(e.g. use.mask, or IUSE=).

Consistency would be nice, the real question is, what does USE_EXPAND
actually try to achieve, and can we fix it properly in the next EAPI,
such that repoman can also do the proper complaints about USE-flag
(and USE_EXPAND-flag) naming by then.

Back to the thread, the point is, these flags exist today, and renaming
flags is not something to be considered harmless.  As much as the recent
renaming of lm_sensors to lm-sensors caused breakage (and still does,
apparently some tools keep caches, etc.) also renaming USE-flags goes by
problems, in particular for managed systems (Chef, Puppet).  It's not a
matter of just fixing the name for a USE-flag.  This is saying nothing
about whether or not we'd want to change the flag.  It's about the
impact of the change, and whether that is worth it for the noble aim of
consistency or correctness.  I believe this was the OPs point in this
thread.

Thanks,
Fabian

-- 
Fabian Groffen
Gentoo on a different level

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2019-09-21  7:34 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox