Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 256519 - Automatic USE flag dependency resolution
Summary: Automatic USE flag dependency resolution
Status: RESOLVED DUPLICATE of bug 258371
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: High enhancement with 1 vote (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-27 13:09 UTC by Arne Babenhauserheide
Modified: 2011-03-20 21:57 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arne Babenhauserheide 2009-01-27 13:09:16 UTC
I recently ran into "needs to be emerged with USE flag +xyz" again, and I'd love to see portage handle that automatically. 

When I want to emerge a package which requires another package to be built with specific USE-flags, I'd love to see portage just remerging the other package with the needed USE flag without bothering me about that. 

It would save me from having to do two unnecessary steps, since I always add the specific USE flags to the package.use

I'd wish for USE flag dependencies to be resolved automatically just like other dependencies. 

A related bug is http://bugs.gentoo.org/show_bug.cgi?id=249342 

Besidse: MAny thanks for your work on portage! It's simply great! 

Reproducible: Always
Comment 1 Serkan Kaba (RETIRED) gentoo-dev 2009-01-27 14:32:26 UTC
That's already supported by stable portage. It's just packages that need to be migrated. Please file bugs per-package basis.

*** This bug has been marked as a duplicate of bug 2272 ***
Comment 2 Marius Mauch (RETIRED) gentoo-dev 2009-01-27 14:52:00 UTC
This is not a dupe of bug 2272.
USE-deps will notify the user during dependency calculation about the missing flags instead of dying in pkg_setup, however they don't automatically rebuild the affected packages.

While that feature is certainly appealing in many cases it would be a slippery slope as it effectively ignores the current user configuration. If for example you specifically enabled/disabled a flag in package.use you probably don't want portage to ignore that setting silently just because another package needs it.

Maybe adding another layer in USE_ORDER that sits between "conf" and "defaults" could work though.
Comment 3 Serkan Kaba (RETIRED) gentoo-dev 2009-01-27 15:07:38 UTC
(In reply to comment #2)
> USE-deps will notify the user during dependency calculation about the missing
> flags instead of dying in pkg_setup, however they don't automatically rebuild
> the affected packages.

Afair, dependencies are rebuilt with needed USE flags, aren't they?
Comment 4 Marius Mauch (RETIRED) gentoo-dev 2009-01-27 16:28:13 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > USE-deps will notify the user during dependency calculation about the missing
> > flags instead of dying in pkg_setup, however they don't automatically rebuild
> > the affected packages.
> 
> Afair, dependencies are rebuilt with needed USE flags, aren't they?

They aren't (not in 2.1.6.4 at least). As said, this would be questionable behavior.
Comment 5 Will Simoneau 2009-01-27 16:37:35 UTC
(In reply to comment #2)
> While that feature is certainly appealing in many cases it would be a slippery
> slope as it effectively ignores the current user configuration. If for example
> you specifically enabled/disabled a flag in package.use you probably don't want
> portage to ignore that setting silently just because another package needs it.


Portage should be able to tell if the user has explicitly specified the state of a USE-flag or not.

If the user does not specify: automatically satisfy dependent package's requirement by rebuilding needed package with USE-flag change.
If the user explicitly has USE=foo or USE=-foo somewhere in configuration for the package depended on, and it conflicts with the dependent package, THEN exit with an error.
Comment 6 Marius Mauch (RETIRED) gentoo-dev 2009-01-27 16:54:10 UTC
(In reply to comment #5)
> Portage should be able to tell if the user has explicitly specified the state
> of a USE-flag or not.
> 
> If the user does not specify: automatically satisfy dependent package's
> requirement by rebuilding needed package with USE-flag change.
> If the user explicitly has USE=foo or USE=-foo somewhere in configuration for
> the package depended on, and it conflicts with the dependent package, THEN exit
> with an error.

That's basically what I said in the part you didn't quote ;)
Comment 7 Alexandre Hannud Abdo 2010-03-19 05:28:23 UTC
Just a thought.

What happens frequently with me is that I see the missing dependency USE flag message and I choose to change the global flag instead of only enabling for that package.

The reason is that sometimes I don't enable a flag because I don't want some library installed, but once that library has to be installed by necessity, I want it enabled everywhere.

So there should always be a visible message informing that some USE flag has been automatically enabled for some package.

That, plus a way to check all USE flags automatically enabled by dependency requirements.

Of course, any of this has to be in addition to not conflicting with user configuration, as Marius observed.

And if that ever happens, it would be cool to have a way to tell the user which USE flags have their conditions already met for all installed packages, meaning no new packages would be installed if globally enabled.

:)

Thanks!
~~
Comment 8 Zac Medico gentoo-dev 2011-03-20 21:19:49 UTC

*** This bug has been marked as a duplicate of bug 258371 ***
Comment 9 Nicholas J. Michalek 2011-03-20 21:43:52 UTC
Whoa whoa whoa... THIS bug has been marked as a duplicate of a NEWER BUG with LESS VOTES? Just sayin'...

I guess I don't care that much, as long as this feature is regarded with the appropriate level of importance.
Comment 10 Zac Medico gentoo-dev 2011-03-20 21:57:30 UTC
Hmm, it would be nice if bugzilla would automatically combine the votes of duplicate bugs. I guess we'll just have to account for that manually.