View previous topic :: View next topic |
Author |
Message |
lordoftheworld n00b
Joined: 16 Jun 2004 Posts: 19
|
Posted: Wed Apr 11, 2018 8:13 pm Post subject: USE flag dependencies and reverse dependencies |
|
|
I'm looking for a way to determine USE flag dependencies and reverse dependencies on other packages and their USE flags. Portage lets you know one at a time, if there is a conflict. I'd like to know any effects on installed packages anytime I change a global or package USE flag.
Is there an open issue/feature request for this? |
|
Back to top |
|
|
arnvidr l33t
Joined: 19 Aug 2004 Posts: 629 Location: Oslo, Norway
|
Posted: Fri Apr 13, 2018 7:51 am Post subject: |
|
|
You can check which of your installed packages has or has not a particular USE flag set, for instance to check your packages for the 'perl' flag:
Code: | USE="perl"; for PKG in $(equery -q hasuse $USE); do echo $PKG: $(equery -q uses $PKG |grep $USE); done |
I am not aware of any 'easy solution' to what I think you're asking for, except running emerge -Up @world or similar. _________________
|
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Fri Apr 13, 2018 10:17 am Post subject: |
|
|
isn't that just easier to not guess and analyse what will happen but instead just ask portage what will happen?
if you want see what impact a useflag will have on your system, you can run portage with the useflag set on/off and see what portage is saying about it no?
i'm not sure i'm clear, so here's an example to see how a use flag change would affect the system
Code: | USE="-ssl" emerge -uDN world -pv |
|
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Fri Apr 13, 2018 10:59 am Post subject: |
|
|
arnvidr wrote: | Code: | USE="perl"; for PKG in $(equery -q hasuse $USE); do echo $PKG: $(equery -q uses $PKG |grep $USE); done |
|
arnvidr ... if you're doing that then you should probably think about using the following:
Code: | % eix --only-names --exact --installed-with-use perl |
@lordoftheworld ... in addition to what krinn pointed out you might also add '--tree,-t'.
best ... khay |
|
Back to top |
|
|
Mr. T. Guru
Joined: 26 Dec 2016 Posts: 477
|
Posted: Fri Apr 13, 2018 11:12 am Post subject: |
|
|
A USE flag allows to enable an internal feature or add a dependency of a software. Some utilities provide USE flags descriptions and dependencies.
I'm not sure if you wonder whether a software/package has a USE flag enabled (mandatory) because it is a dependency of an installed software/package.
Code: | user $ emerge -Upv -t --unordered-display @world
user $ #emerge -Upq -t --unordered-display @world |
Edit: I do not understand implied mechanisms but I lack of knowledge. I looked at this old article: https://www.linux.com/news/best-practices-autotools
The developer manual tells about "intrinsic USE dependencies" or "Built with USE dependencies" in relation to "conflicting USE flag".
Edit: revision. |
|
Back to top |
|
|
lordoftheworld n00b
Joined: 16 Jun 2004 Posts: 19
|
Posted: Sun Apr 15, 2018 1:46 am Post subject: |
|
|
Thanks for all the replies. I usually do what @krinn said, just let portage tell me, and this works in most cases (for global and package specific USE flag changes), but when there are conflicts, or when I'm trying to decide whether I should turn a USE flag on or off, I wish portage would give me more fine grained information as much as the fine grained control it's giving me.
Two things I would like are:
1) When a dependency is being pulled in because of a USE flag. Even with -t, this information isn't there I think.
2) When I change required USE flags, portage lets you know one at a time why it's required. For the subset of my installed packages, I'd like to know any dependencies on the USE flag.
For example, if I try to globally remove the fortran USE flag, I'd like to know that I'll also have to turn off the filter USE flag on the gnuradio package (just checking for installed packages with same USE flags doesn't work for this). To some extent, I'm really asking for a wrapper around changing USE flags that could tell you about these changes. ie. 'equery use -d/a <package name> <use flag>'. Out of equery uses, quse and eix, I haven't played around with eix much, but it might be possible to do what I want with eix if I looked at it more. |
|
Back to top |
|
|
Mr. T. Guru
Joined: 26 Dec 2016 Posts: 477
|
Posted: Sun Apr 15, 2018 8:12 am Post subject: |
|
|
The default configuration must be functional. An administrator may use global USE flags for an automatic (systematic) configuration.
The @world set only include explicitly required softwares (without the dependencies). A random package may have USE flags.
Consistency is enough to know how to proceed with USE flags (see: USE flags). |
|
Back to top |
|
|
arnvidr l33t
Joined: 19 Aug 2004 Posts: 629 Location: Oslo, Norway
|
Posted: Sun Apr 15, 2018 11:40 am Post subject: |
|
|
khayyam wrote: | arnvidr wrote: | Code: | USE="perl"; for PKG in $(equery -q hasuse $USE); do echo $PKG: $(equery -q uses $PKG |grep $USE); done |
|
arnvidr ... if you're doing that then you should probably think about using the following:
Code: | % eix --only-names --exact --installed-with-use perl |
| Yeah, could probably make a faster version with the installed-with/without parameters to eix, but my example was just copied straight from the equery man page _________________
|
|
Back to top |
|
|
Mr. T. Guru
Joined: 26 Dec 2016 Posts: 477
|
Posted: Sun Apr 15, 2018 12:45 pm Post subject: |
|
|
Nobody noticed anything but I said something stupid.
Code: | user $ emerge -Upv -t --unordered-display @world
user $ #emerge -Upq -t --unordered-display @world |
The above command is wrong. |
|
Back to top |
|
|
lordoftheworld n00b
Joined: 16 Jun 2004 Posts: 19
|
Posted: Mon Apr 16, 2018 2:02 am Post subject: |
|
|
So I didn't know about euse. euse -p and -E/D/R lets you change package/global USE flags and enable/disable/remove them. euse -i spits out some information, though I don't know if it's USE flag dependency information. gentoolkit, q, eix and portage caches might or might not have USE flag dependency information, it's not obvious that they do.
@Mr. T... so how would an admin do the two things I'm asking? |
|
Back to top |
|
|
Mr. T. Guru
Joined: 26 Dec 2016 Posts: 477
|
Posted: Mon Apr 16, 2018 6:52 am Post subject: |
|
|
@lordoftheworld: an administrator enables the features wisely before installing software and USE flags changes are done by the package manager.
You try to solve the problem in reverse order: remove dependencies disabling USE flags rather than enable USE flags to "add" (support) features.
Note: I think there is a confusion about USE flags: a global (a.k.a general) USE flag may be enabled per package too /etc/portage/package.use. |
|
Back to top |
|
|
lordoftheworld n00b
Joined: 16 Jun 2004 Posts: 19
|
Posted: Mon Apr 16, 2018 7:47 am Post subject: |
|
|
@Mr. T you'll excuse me while I try to find a tool that solves the problem I've pretty clearly laid out. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 23017
|
|
Back to top |
|
|
|