View previous topic :: View next topic |
Author |
Message |
midnite Guru
Joined: 09 Apr 2006 Posts: 449 Location: Hong Kong
|
Posted: Wed Nov 13, 2024 3:17 am Post subject: Check what will an USE flag pull in? |
|
|
Take kde-apps/kdesdk-meta as an example. By default all its USE flags are disabled. Installing kde-apps/kdesdk-meta with default USE flags options almost install nothing.
eix kdesdk-meta: | [I] kde-apps/kdesdk-meta
Available versions: 24.05.2 24.08.1{xpak} ~24.08.2 {cvs git mercurial perl php python subversion webengine}
Installed versions: 24.08.1{xpak}(09點50分25秒 2024年11月13號 禮拜叁)(-cvs -git -mercurial -perl -php -python -subversion -webengine)
Homepage: https://apps.kde.org/categories/development/
Description: KDE SDK - merge this to pull in all kdesdk-derived packages |
After installed kde-apps/kdesdk-meta, (almost) none of these programs available in my system.
equery depgraph kdesdk-meta: | * dependency graph for kde-apps/kdesdk-meta-24.08.1
...
`-- kde-apps/kdesdk-meta-24.08.1 amd64
`-- dev-util/massif-visualizer-24.08.1 (>=dev-util/massif-visualizer-24.08.1) amd64
`-- kde-apps/kapptemplate-24.08.1 (>=kde-apps/kapptemplate-24.08.1) amd64
`-- kde-apps/kcachegrind-24.08.1 (>=kde-apps/kcachegrind-24.08.1) amd64
`-- kde-apps/kde-dev-scripts-24.08.1 (>=kde-apps/kde-dev-scripts-24.08.1) amd64
`-- kde-apps/kde-dev-utils-24.08.1 (>=kde-apps/kde-dev-utils-24.08.1) amd64
`-- kde-apps/kdesdk-thumbnailers-24.08.1 (>=kde-apps/kdesdk-thumbnailers-24.08.1) amd64
`-- kde-apps/kompare-24.08.1 (>=kde-apps/kompare-24.08.1) amd64
`-- kde-apps/libkomparediff2-24.08.1 (>=kde-apps/libkomparediff2-24.08.1) amd64
`-- kde-apps/poxml-24.08.1-r1 (>=kde-apps/poxml-24.08.1) amd64
`-- kde-apps/umbrello-24.08.1 (>=kde-apps/umbrello-24.08.1) amd64
`-- kde-apps/cervisia-24.08.1 (>=kde-apps/cervisia-24.08.1) amd64
`-- kde-apps/dolphin-plugins-git-24.08.1 (>=kde-apps/dolphin-plugins-git-24.08.1) amd64
`-- kde-apps/dolphin-plugins-mercurial-24.08.1 (>=kde-apps/dolphin-plugins-mercurial-24.08.1) amd64
`-- dev-util/kio-perldoc-24.08.1 (>=dev-util/kio-perldoc-24.08.1) amd64
`-- kde-apps/lokalize-24.08.1 (>=kde-apps/lokalize-24.08.1) amd64
`-- kde-apps/dolphin-plugins-subversion-24.08.1-r1 (>=kde-apps/dolphin-plugins-subversion-24.08.1) amd64
`-- dev-util/kdevelop-24.08.1 (>=dev-util/kdevelop-24.08.1) amd64
`-- dev-util/kdevelop-php-24.08.1 (>=dev-util/kdevelop-php-24.08.1) amd64
`-- dev-util/kdevelop-python-24.08.1 (>=dev-util/kdevelop-python-24.08.1) amd64
[ kde-apps/kdesdk-meta-24.08.1 stats: packages (20), max depth (1) ]
... |
I can try enabling the USE flag and see what packages it will pull in.
USE='webengine' emerge -pv kde-apps/kdesdk-meta: | These are the packages that would be merged, in order:
...
...
[ebuild N ] sys-devel/clang-runtime-18.1.8:18::gentoo USE="compiler-rt openmp sanitize -libcxx" ABI_X86="32 (64) (-x32)" 0 KiB
[ebuild N ] dev-util/kdevelop-24.08.1:6/24.08::gentoo USE="handbook plasma qmake share -debug -gdbui -subversion -test" LLVM_SLOT="18 -15 -16 -17" 8,588 KiB
[ebuild N ] kde-apps/dolphin-plugins-git-24.08.1:6::gentoo USE="-debug" 0 KiB
[ebuild N ] dev-util/kdevelop-php-24.08.1:6::gentoo USE="handbook -debug -test" 1,069 KiB
[ebuild N ] dev-util/kdevelop-python-24.08.1:6::gentoo USE="-debug -test" PYTHON_SINGLE_TARGET="python3_12 -python3_10 -python3_11" 1,076 KiB
[ebuild R ] kde-apps/kdesdk-meta-24.08.1::gentoo USE="git* php* python* webengine* -cvs -mercurial -perl -subversion" 0 KiB
Total: 53 packages (1 upgrade, 51 new, 1 reinstall), Size of downloads: 179,176 KiB |
But what if after I actually installed those packages, how to check what packages that the USE flag would pull in?
I found that the dependency information may be written in the ebuild file.
cat /var/db/pkg/kde-apps/kdesdk-meta-24.08.1/kdesdk-meta-24.08.1.ebuild: | ...
webengine? (
>=dev-util/kdevelop-${PV}:*
php? ( >=dev-util/kdevelop-php-${PV}:* )
python? ( >=dev-util/kdevelop-python-${PV}:* )
)
... |
Any programs to phrase this dependence information recursively (or up to a depth of e.g. 3)? _________________ - midnite. |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5121 Location: Bavaria
|
Posted: Wed Nov 13, 2024 12:37 pm Post subject: Re: Check what will an USE flag pull in? |
|
|
midnite wrote: | [...] But what if after I actually installed those packages, how to check what packages that the USE flag would pull in?
I found that the dependency information may be written in the ebuild file. [...] |
Yes, you will find the answer what a USE flag will pull in, in the ebuild file ... OR ... you can also check it with emerge (by using parameter -p and a temporary adding of a flag) ... e.g.:
Code: | # USE="newflag" emerge -pvD packagename |
(of course you should set this flag later in your /etc/portage/package.use IF you really want to use it.) _________________ https://wiki.gentoo.org/wiki/User:Pietinger |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9612 Location: beyond the rim
|
Posted: Thu Nov 14, 2024 10:56 am Post subject: Re: Check what will an USE flag pull in? |
|
|
midnite wrote: | But what if after I actually installed those packages, how to check what packages that the USE flag would pull in? |
Maybe this is a language issue, but I don't understand your question. Or rather, you already answered it yourself in the previous sentence.
Probably easiest if you could give a specific example what output you're looking for a given input. It looks like you want to use "kdesdk-meta" and "webengine" as inputs, but I'm not really sure what output you're looking for if you're not satisified with what you already got. |
|
Back to top |
|
|
midnite Guru
Joined: 09 Apr 2006 Posts: 449 Location: Hong Kong
|
Posted: Fri Nov 15, 2024 10:30 am Post subject: |
|
|
Thanks both pietinger and Genone for reply.
Sorry if I caused the confusion.
Before the USE flag was enabled, USE='webengine' emerge -pv kde-apps/kdesdk-meta would list the packages going to be emerged, (This output is quoted from my first post):
Code: | These are the packages that would be merged, in order:
...
...
[ebuild N ] sys-devel/clang-runtime-18.1.8:18::gentoo USE="compiler-rt openmp sanitize -libcxx" ABI_X86="32 (64) (-x32)" 0 KiB
[ebuild N ] dev-util/kdevelop-24.08.1:6/24.08::gentoo USE="handbook plasma qmake share -debug -gdbui -subversion -test" LLVM_SLOT="18 -15 -16 -17" 8,588 KiB
[ebuild N ] kde-apps/dolphin-plugins-git-24.08.1:6::gentoo USE="-debug" 0 KiB
[ebuild N ] dev-util/kdevelop-php-24.08.1:6::gentoo USE="handbook -debug -test" 1,069 KiB
[ebuild N ] dev-util/kdevelop-python-24.08.1:6::gentoo USE="-debug -test" PYTHON_SINGLE_TARGET="python3_12 -python3_10 -python3_11" 1,076 KiB
[ebuild R ] kde-apps/kdesdk-meta-24.08.1::gentoo USE="git* php* python* webengine* -cvs -mercurial -perl -subversion" 0 KiB
Total: 53 packages (1 upgrade, 51 new, 1 reinstall), Size of downloads: 179,176 KiB |
After I actually emerged all the 53 packages above, now executing any of the three commands below, it will not show what the USE flag "webengine" will pull in.
- emerge -pv kde-apps/kdesdk-meta
- USE='webengine' emerge -pv kde-apps/kdesdk-meta
- USE='-webengine' emerge -pv kde-apps/kdesdk-meta
All of them show the same output:
Code: | These are the packages that would be merged, in order:
Calculating dependencies ... done!
Dependency resolution took 11.72 s (backtrack: 0/20).
[ebuild R ] kde-apps/kdesdk-meta-24.08.1::gentoo USE="git php python webengine -cvs -mercurial -perl -subversion" 0 KiB
Total: 1 package (1 reinstall), Size of downloads: 0 KiB |
This is what I expected. And I understand this output.
It may be possible to run USE='-webengine' emerge -pv --deep --depclean and see what packages will be removed. It will get a picture of what packages was pulled in by the USE flag "webengine". But I have a bad habit that quite a few packages were not recorded in @world (was emerged by --oneshot). Doing emerge --depclean will include a lot of other packages. As a result, this approach is not possible.
From the ebuild file /var/db/pkg/kde-apps/kdesdk-meta-24.08.1/kdesdk-meta-24.08.1.ebuild, the answer to what the USE flag "webengine" will pull in is actually written there:
Code: | ...
webengine? (
>=dev-util/kdevelop-${PV}:*
php? ( >=dev-util/kdevelop-php-${PV}:* )
python? ( >=dev-util/kdevelop-python-${PV}:* )
)
... |
But this is not the full answer. For example I do not know (directly from the ebuild file) that kde-apps/dolphin-plugins-git was pulled in by the USE flag "webengine". Any programs to phrase this dependence information recursively?
My imaginary input would be: equery depgraph kde-apps/kdesdk-meta --useflag webengine
And the expected output is: (This list is composed from the USE='webengine' emerge -pv kde-apps/kdesdk-meta output in my first post.)
Code: | dev-util/kdevelop-python
dev-util/kdevelop-php
kde-apps/dolphin-plugins-git
dev-util/kdevelop
sys-devel/clang-runtime
...
53 packages |
The program logic should be:
- Read the ebuild file /var/db/pkg/kde-apps/kdesdk-meta-24.08.1/kdesdk-meta-24.08.1.ebuild section webengine? ( ... )
- Check >=dev-util/kdevelop-${PV}:*. If true, recursive into it.
- Check if php USE flag is enabled. If true, recursive check dev-util/kdevelop-php.
- Check if python USE flag is enabled. If true, recursive check dev-util/kdevelop-python.
It is actually similar to what equery depgraph kde-apps/kdesdk-meta tells us.
Code: | equery depgraph kde-apps/kdesdk-meta
...
* dependency graph for kde-apps/kdesdk-meta-24.08.1
`-- kde-apps/kdesdk-meta-24.08.1 amd64
`-- dev-util/massif-visualizer-24.08.1 (>=dev-util/massif-visualizer-24.08.1) amd64
`-- kde-apps/kapptemplate-24.08.1 (>=kde-apps/kapptemplate-24.08.1) amd64
`-- kde-apps/kcachegrind-24.08.1 (>=kde-apps/kcachegrind-24.08.1) amd64
`-- kde-apps/kde-dev-scripts-24.08.1 (>=kde-apps/kde-dev-scripts-24.08.1) amd64
`-- kde-apps/kde-dev-utils-24.08.1 (>=kde-apps/kde-dev-utils-24.08.1) amd64
`-- kde-apps/kdesdk-thumbnailers-24.08.1 (>=kde-apps/kdesdk-thumbnailers-24.08.1) amd64
`-- kde-apps/kompare-24.08.1 (>=kde-apps/kompare-24.08.1) amd64
`-- kde-apps/libkomparediff2-24.08.1 (>=kde-apps/libkomparediff2-24.08.1) amd64
`-- kde-apps/poxml-24.08.1-r1 (>=kde-apps/poxml-24.08.1) amd64
`-- kde-apps/umbrello-24.08.1 (>=kde-apps/umbrello-24.08.1) amd64
`-- kde-apps/cervisia-24.08.1 (>=kde-apps/cervisia-24.08.1) amd64
`-- kde-apps/dolphin-plugins-git-24.08.1 (>=kde-apps/dolphin-plugins-git-24.08.1) amd64
`-- kde-apps/dolphin-plugins-mercurial-24.08.1 (>=kde-apps/dolphin-plugins-mercurial-24.08.1) amd64
`-- dev-util/kio-perldoc-24.08.1 (>=dev-util/kio-perldoc-24.08.1) amd64
`-- kde-apps/lokalize-24.08.1 (>=kde-apps/lokalize-24.08.1) amd64
`-- kde-apps/dolphin-plugins-subversion-24.08.1-r1 (>=kde-apps/dolphin-plugins-subversion-24.08.1) amd64
`-- dev-util/kdevelop-24.08.1 (>=dev-util/kdevelop-24.08.1) amd64
`-- dev-util/kdevelop-php-24.08.1 (>=dev-util/kdevelop-php-24.08.1) amd64
`-- dev-util/kdevelop-python-24.08.1 (>=dev-util/kdevelop-python-24.08.1) amd64
[ kde-apps/kdesdk-meta-24.08.1 stats: packages (20), max depth (1) ]
... |
But I was surprised that after I emerge -av kde-apps/kdesdk-meta, none of the packages above was installed. It is because all the USE flags of kde-apps/kdesdk-meta were OFF by default. equery depgraph kde-apps/kdesdk-meta does not give the USE flag conditional information. _________________ - midnite. |
|
Back to top |
|
|
CaptainBlood Advocate
Joined: 24 Jan 2010 Posts: 3872
|
Posted: Fri Nov 15, 2024 3:16 pm Post subject: |
|
|
equery d doesn't filter its output according to active USE flags.
So once the most recent package install has pulled any new package,
equery d will report about any installed package which COULD require such new package to be installed.
It would be indeed be nice if equery could only report packages which DO require new package installed according to their current settings.
Thks 4 ur attention, interest & support. _________________ USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Last edited by CaptainBlood on Fri Nov 15, 2024 4:05 pm; edited 1 time in total |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9612 Location: beyond the rim
|
Posted: Fri Nov 15, 2024 3:51 pm Post subject: |
|
|
Ok, it was a language issue. Your question is "How to check what packages were pulled in due to a specific USE flag?"
That is a complex topic. In your example, kdevelop-php and kdevelop-python were pulled in by USE=webengine, but only because you also had set USE="php python". And other relationsships are even more complex. Properly resolving all that in reverse and displaying it in a usable way is quite tricky.
Quote: | For example I do not know (directly from the ebuild file) that kde-apps/dolphin-plugins-git was pulled in by the USE flag "webengine". |
Because it wasn't. Your example includes multiple USE changes (evident by the * in front of php and python), not just USE=webengine. Where those came from I can't tell, I'd assume you've modified make.conf and/or package.use. And dolphin-plugins-git was installed because you set USE=git, there is no relation to USE=webengine at all. |
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2443
|
Posted: Fri Nov 15, 2024 4:11 pm Post subject: |
|
|
midnite wrote: |
But this is not the full answer. For example I do not know (directly from the ebuild file) that kde-apps/dolphin-plugins-git was pulled in by the USE flag "webengine". Any programs to phrase this dependence information recursively? |
Add --tree (-t) to your emerge query. Then you can inspect the packages reported to pull in packages of interest and find out about the use flags. There's no such program because this is not a common case. You rarely do it and once you're all set you forget about it. Unless you install a new system every other day :)
Best Regards,
Georgi |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|