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
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?
*** Bug 138622 has been marked as a duplicate of this bug. ***
Corrected subject typo for improved searchability.
This can now be done via eix and several --*overlay* switches, example:
$ eix -I --installed-from-overlay kde-testing
gentoolkit-0.3.0.4 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.
This feature is now in >=gentoolkit-0.3.0.4
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.