public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] "Lazy" use flags?
@ 2016-02-09 12:27 Kent Fredric
  2016-02-09 13:14 ` Daniel Campbell
  0 siblings, 1 reply; 42+ messages in thread
From: Kent Fredric @ 2016-02-09 12:27 UTC (permalink / raw
  To: gentoo-dev

There's a frequent irritation I experience with the revolving door of
REQUIRED_USE -> auto-unmask:

There's no mechanism in place to automatically stop using a "REQUIRED"
use flag when it ceases to be necessary.

So you find yourself doing things like:

- I want X
- X only supports python 2.7
- X thus requires a dependency that supports both 2.7 and 3.5 to set
USE= for python 2.7
- So you add a USE in your package.use for that dependency.
- This creates a cascade of requiring python 2.7, sometimes extending
to pull extra dependencies for back-ports.

Later, X adds Python 3.5 support.

And now you have redundant USE flags in place, and those USE flags
pull in dependencies you no longer need in order to support a python
2.7 featureset.

Now, this is not about "python", this is just the general pattern of
ebuilds saying "I need this", and then requiring me to manually
acknowledge "I need this" when I don't actually want this myself,
similar to how packages "I need" go in the world file and don't get
depcleaned, and packages I "don't need" are handled by portage
automatically satisfying dependencies.

And you have to invest a respectable amount of effort to prune these
un-needed dependencies and features which portage now thinks "you
want", even long after the reason for that is gone.

What I'd like is a middle ground, a USE specification that can be
stated in package.use that portage interprets as a "permission to
enable" flag, a USE flag that is treated as "ON" if any dependency
states it needs it on, and that is treated as "OFF" as soon as there
are no dependencies in the graph that need it on.

Or vice versa.

Naturally, this needn't be part of PMS, because this pertains to
nothing about the package dependency specification itself, only a
feature for user convenience in the portage interface.

I would love to be able to stop maintaining my reasonably large set of
package.env tricks which I have to regularly update so that things I
don't need will get expunged when I cease to need them, and I'd love
to be able to say something like

PYTHON_TARGETS="python3_5 python2_7?" and have portage treat the
former as "always on" and the latter as "On if a dependency or
REQUIRED_USE constraint indicated it was needed".

Though it may not be so straight forward to implement, and is likely
to complicate backtracking.... though in theory it could make things
simpler.

So I table this query to the dev ml in the event somebody else sees
merit in the idea.

-- 
Kent

KENTNL - https://metacpan.org/author/KENTNL


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

end of thread, other threads:[~2016-02-12 15:59 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-09 12:27 [gentoo-dev] "Lazy" use flags? Kent Fredric
2016-02-09 13:14 ` Daniel Campbell
2016-02-09 13:19   ` Kent Fredric
2016-02-09 13:22     ` Daniel Campbell
2016-02-09 13:28       ` Kent Fredric
2016-02-09 20:35     ` Róbert Čerňanský
2016-02-09 23:30       ` Tim Harder
2016-02-10  0:20       ` Kent Fredric
2016-02-10  1:12         ` Rich Freeman
2016-02-10  2:23           ` Kent Fredric
2016-02-10 20:00             ` Róbert Čerňanský
2016-02-11  0:18               ` Raymond Jennings
2016-02-11  0:42                 ` Rich Freeman
2016-02-11  2:18                   ` Kent Fredric
2016-02-11  2:51                     ` Rich Freeman
2016-02-11  3:46                       ` Daniel Campbell
2016-02-11 12:59                         ` Rich Freeman
2016-02-11 13:54                           ` NP-Hardass
2016-02-11 14:25                             ` Kent Fredric
2016-02-11 23:51                           ` Daniel Campbell
2016-02-11  4:57                       ` Kent Fredric
2016-02-11  5:47                         ` Raymond Jennings
2016-02-11 12:55                         ` Rich Freeman
2016-02-11 14:19                           ` M. J. Everitt
2016-02-11 14:32                             ` Kent Fredric
2016-02-11 14:43                               ` M. J. Everitt
2016-02-11 14:46                                 ` Kent Fredric
2016-02-11 14:48                                   ` M. J. Everitt
2016-02-11 14:53                                     ` Kent Fredric
2016-02-11 19:37                           ` Róbert Čerňanský
2016-02-12  5:56                           ` [gentoo-dev] " Duncan
2016-02-12  6:36                             ` Kent Fredric
2016-02-12 11:26                               ` Rich Freeman
2016-02-12 15:58                                 ` Gordon Pettey
2016-02-11  2:31                   ` [gentoo-dev] " Kent Fredric
2016-02-10  3:08     ` Gordon Pettey
2016-02-10  3:29       ` Daniel Campbell
2016-02-12  0:01         ` William Hubbs
2016-02-12  0:12           ` Daniel Campbell
2016-02-12  1:23             ` Rich Freeman
2016-02-12  1:26               ` Daniel Campbell
2016-02-12  1:39                 ` Rich Freeman

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