Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 623984

Summary: [Future EAPI] Allow -* in profile package.use
Product: Gentoo Hosted Projects Reporter: Zac Medico <zmedico>
Component: PMS/EAPIAssignee: PMS/EAPI <pms>
Status: RESOLVED WONTFIX    
Severity: normal CC: esigra, mgorny, sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=623850
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 174380    

Description Zac Medico gentoo-dev 2017-07-06 15:33:51 UTC
Given that package.use represents per-package USE, doesn't it follow that it should support -* like USE does? Portage already allows this in user configuration, but it doesn't work in profiles.
Comment 1 Ulrich Müller gentoo-dev 2017-07-06 19:11:17 UTC
Would this apply to package.use{,.stable}.{mask,force} as well, or exclusively to package.use?
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-07-06 20:07:41 UTC
Should we also support '*' for symmetry? Then, do we also want to support using this on top of USE_EXPAND alike Portage, i.e. 'foo_bar_*'? Then, do we want to support '*' everywhere to avoid confusion? Then, do we want full fnmatch() syntax support to avoid confusion even more?

At this point, I really think we shouldn't support '-*' anywhere and expect people to be able to type the few flags they want to actually disable verbosely.
Comment 3 Zac Medico gentoo-dev 2017-07-06 20:39:08 UTC
(In reply to Ulrich Müller from comment #1)
> Would this apply to package.use{,.stable}.{mask,force} as well, or
> exclusively to package.use?

Exclusively to package.use. Note that use.mask and use.force do not support -* (and it's not very useful for them anyway).

(In reply to Michał Górny from comment #2)
> Should we also support '*' for symmetry? Then, do we also want to support
> using this on top of USE_EXPAND alike Portage, i.e. 'foo_bar_*'? Then, do we
> want to support '*' everywhere to avoid confusion? Then, do we want full
> fnmatch() syntax support to avoid confusion even more?

Those are all very interesting questions, but lets consider them as essentially unrelated. We're concerned only with -* here, which has a well-known meaning in the context of the USE variable.

> At this point, I really think we shouldn't support '-*' anywhere and expect
> people to be able to type the few flags they want to actually disable
> verbosely.

Sure, we could drop the -* support from USE, in order to make it consistent with package.use behavior. However, that might upset some people who have been relying on it.
Comment 4 Ulrich Müller gentoo-dev 2017-07-07 16:53:34 UTC
Maybe we should simply keep status quo?

Starting from a blank slate might be more useful in global USE than on a per package basis (where the number of flags is limited).
Comment 5 Zac Medico gentoo-dev 2017-07-07 17:56:04 UTC
(In reply to Ulrich Müller from comment #4)
> Maybe we should simply keep status quo?

Is the behavior defined or not? Is Portage free to "fix" bug 623850?

> Starting from a blank slate might be more useful in global USE than on a per
> package basis (where the number of flags is limited).

That's reasonable enough, but portage allows this in user configuration, and used to allow it in profiles prior to this commit:

https://github.com/gentoo/portage/commit/9e9c822aae0c3daab208175025b161d6d34877fe
Comment 6 Ulrich Müller gentoo-dev 2017-07-07 19:37:33 UTC
(In reply to Zac Medico from comment #5)
> Is the behavior defined or not?

As I read the spec, it allows -* for USE (and other incremental variables):
https://projects.gentoo.org/pms/6/pms.html#x1-620005.3.1
However, it doesn't mention this syntax for package.use:
https://projects.gentoo.org/pms/6/pms.html#x1-590005.2.10

> Is Portage free to "fix" bug 623850?

No (if my above interpretation is correct).

> That's reasonable enough, but portage allows this in user configuration,
> and used to allow it in profiles prior to this commit:
> 
> https://github.com/gentoo/portage/commit/
> 9e9c822aae0c3daab208175025b161d6d34877fe

That commit was 7 years ago, so I would conclude that _not_ supporting -* in package.use is established behaviour.
Comment 7 Zac Medico gentoo-dev 2017-07-07 19:41:56 UTC
I'm happy enough if we resolve this as WONTFIX.
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-09-08 17:49:26 UTC
Let's WONTFIX it then. Feel free to reopen if somebody comes with a really good use case for it, and we can rediscuss.