vaeth / eix

eix can access Gentoo portage ebuild information and description very quickly (using a local cache). It can also be used to access information on installed packages, local settings, and local and external overlays, and informs about changes in the tree
GNU General Public License v2.0
166 stars 14 forks source link

Inversed --use option variant #81

Open nick87720z opened 4 years ago

nick87720z commented 4 years ago

There could be option like --no-use, which would have inversed effect comparing to --use, i.e. select packages, that don't have mentioned flag.

As for use case (I just have it), it could be used with --installed-with-use to find installed packages that dropped some obsoleted use flag. E.g. I could use it to find those, which droped python2_7 support. For now I had to do it with diff:

diff \
<( eix -c --installed-with-use python_targets_python2_7 --only-names ) \
<( eix -c --installed-with-use python_targets_python2_7 --use python_targets_python2_7 --only-names ) | less

but that's not as convenient as if packages were listed by eix.

vaeth commented 4 years ago

You can use logical expressions everywhere in your query. I suppose that

eix -c --installed-with-use python_targets_python2_7 --and --not --use python_targets_python2_7

will do what you want.