Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 204324 - app-portage/gentoolkit - list packages install from overlay or repository
Summary: app-portage/gentoolkit - list packages install from overlay or repository
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage Tools Team
: 138622 (view as bug list)
Depends on:
Blocks: 346443
  Show dependency tree
Reported: 2008-01-04 19:58 UTC by Ryan
Modified: 2011-12-02 07:22 UTC (History)
2 users (show)

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

equery_inoverlay.patch (equery_inoverlay.patch,2.97 KB, patch)
2008-01-04 20:04 UTC, Ryan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan 2008-01-04 19:58:15 UTC
I've been looking for a way to find which packages are installed from overlays on my system.  After googling, searching bugzilla and searching the forums I concluded there isn't an easy way to do this.

equst list, sort of does, but you can't specificy which to return the packages from a specific repository.

I found in /var/db/pkg/ there is a file inside the package dir named repository, which in the two cases I looked like return the proper repository.

I've modified equery to to such a search using this repository file.  Providing code next.

I'll also provide the output using the xeffects repository
Comment 1 Ryan 2008-01-04 20:04:33 UTC
Created attachment 140118 [details, diff]

I am sure there might be problems with the code, along with other features to add, but this is just a base for getting things going, and for me to play with python a bit.

Here is the output


#equery o xeffects


Couldn't identifiy 519 packages out of 994


As you can see, over half the packages installed don't have the repository file, not sure if these are b/c they were installed with an older portage or some other issue.

Another problem, I have an overlay for KVM and qemu-softmmu , but they don't include a repository file, and they were install just 2 days ago?
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2008-01-04 21:14:36 UTC
*** Bug 138622 has been marked as a duplicate of this bug. ***
Comment 3 2008-02-23 00:34:53 UTC
Corrected subject typo for improved searchability.
Comment 4 Ronny Multrus 2010-11-17 18:02:10 UTC
This can now be done via eix and several --*overlay* switches, example:

$ eix -I --installed-from-overlay kde-testing
Comment 5 Brian Dolbec gentoo-dev 2011-07-21 07:21:24 UTC
gentoolkit- now includes a new "has" module which can look at the "repository" value saved in the vardb.  It can be used for other aux_get() key lookups as well.

# equery has repository gentoo

will list all installed pkgs where the ebuilds were from the main tree.  Substitute 'gentoo' with the overlay you desire to look for.

The caveat is it can only do one lookup at a time and is not capable of a negative lookup. i.e looking for any non-gentoo values.

As for complete reports, gentoolkit's new enalyze module would be suited for this. It could list all installed packages and the repository they were installed from.  It should also report those that do not have a recorded repository value.

It is also intended for equery has to acquire more capability in it's searches, so multiple or negative searches may be possible in future releases.

There is another caveat in that old versions of pkgcore and now the newest version did/does not record the repository data.  So, there may be exceptions causing the list to be incomplete.
Comment 6 Brian Dolbec gentoo-dev 2011-12-02 07:22:09 UTC
This feature is now in >=gentoolkit-

equery has repository foo

Also the latest versions of pkgcore now saves the repository file with the repo name of the where the ebuild came from that was just installed.  There could still be holes of information possible for older installed pkgs that did not record this information.