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
164 stars 13 forks source link

allow eix-installed to ouput repo #73

Closed ostroffjh closed 4 years ago

ostroffjh commented 4 years ago

The eix cache obviously includes repo information, and in my case "eix-installed all" and "eix-installed repo" output identical lists. I'd love to be able to have that output also include the repo. My intent is to be able to find which packages I have installed from any particular overlay I'm using. Sorry if I just missed some existing option, or if there is another easy way to get that info.

vaeth commented 4 years ago

The purpose of eix-installed is to output some information which is relevant for the functioning of eix. It seems what you want is an ordinary eix query. Something like

eix --installed-from-overlay "OVERLAY" -c

(where of course OVERLAY has to be replaced by the appropriate overlay label), or, if you also want to see the versions installed from the overlay only:

A='{overlayvername=OVERLAY}<category>/<name>-<version>\n{}' eix --format '<installedversions:A>' --pure-packages

ostroffjh commented 4 years ago

Thanks - it's not what I was thinking about, but does end up being better. To clarify, I wanted to see ::overlay on each output line from eix-installed. However, as I was then just going to filter by grepping for each overlay, the end result is the same as from your suggestion - with the added advantage for me of showing the version, install timestamp, and description (and I can easily enough craft a filter to only show select pieces of that.)

Another possible future enhancement request (let me know if I should bother to file separately) would be for regular eix output to use [overlay] instead of [1] and having to look at the bottom of the (possibly long) list to see which overlay is [1].

One curiosity - if I do "eix --installed-from-overlay local -c" all lines have [2] but at the bottom is [1] "dotnet" and [2] "local". Is that just because some of those packages also have versions in ::dotnet?

vaeth commented 4 years ago

Again, eix-installed is only a simple shell-script for a particular purpose and is not meant as a general search utility. It will not be extended.

For the numbers, see OVERLAYS_LIST in the manpage of eix.

To see the output of overlays as names instead of numbers, set e.g.

OVERLAYVER=':<overlayvername>'

in the environment or eixrc.

ostroffjh commented 4 years ago

Thanks. I think that last bit is what I've been missing.