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

eix lists deleted ebuilds from overlays #109

Open eternal-sorrow opened 1 year ago

eternal-sorrow commented 1 year ago

I had a ebuild in my local overlay, but I removed it long ago. It is still listed in eix even though it doesn't exist in the overlay. The database was updated many times since then.

> eix gui-apps/grim                                 

[I] gui-apps/grim
     Available versions:  1.4.0[1] 1.4.0-r3 **9999*l {bash-completion fish-completion jpeg +man}
     Installed versions:  1.4.0-r3(21:08:38 2023-03-15)(jpeg man)
     Homepage:            https://sr.ht/~emersion/grim
     Description:         Grab images from a Wayland compositor

[1] "local" /var/lib/portage/repos/local
> ls /var/lib/portage/repos/local/gui-apps/grim
ls: cannot access '/var/lib/portage/repos/local/gui-apps/grim': No such file or directory
vaeth commented 1 year ago

There can be many reasons for your experience.

You might have configured eix in some way to keep the data from the previous eix file. A simple way to do this for overlays not existing anymore is by setting KEEP_VIRTUALS.

A more likely possibility is that the cache eix is reading its data from is stale.

I suggest you to check where eix-update is reading the data from your overlay and what cache method it is using for that overlay: eix-update shows this information.

Then depending on your cache method, check whether there is data in the metadata/cache directory of your overlay which contains this information. Or in /var/cache/edb/$PATH_TO_YOUR_OVERLAY.

eternal-sorrow commented 1 year ago

I use sqlite cache method for my repostories. Is there any way to make sure packages are removed from sqlite cache if they do not exist in the overlay?

eternal-sorrow commented 1 year ago

Okay, removing sqlite file and then running emerge --metadata and then eix-update removed the stale ebuild versions from eix. Is there any way to make this automatic and not so drastic - removing the whole cache and regenerating it?

vaeth commented 1 year ago

I think emerge --metadata alone should be enough. You should always run this before eix-update if you use cache method sqlite.

eternal-sorrow commented 1 year ago

Portage does it automatically after every emaint sync.

vaeth commented 1 year ago

I think emerge --metadata should remove nonexistent ebuilds from the sqlite cache. There might be a bug in the portage implementation. It might be worth filing a bug against portage. If should be intentional that portage never cleans up the sqlite file, I am afraid that the sqlite method of eix cannot be used anymore: I see no reasonable way to solve this problem, as intentionally eix does not check for ebuilds when using the sqlite cache for speed reasons.

eternal-sorrow commented 1 year ago

Just tried it - did emerge --metadata and then eix-update. The old ebuilds are still visible by eix.

xfzv commented 1 month ago

I experienced the same issue, some old ebuilds from my local overlay were still showing up.

This worked for me:

  1. Removing any leftover in /var/cache/edb/dep/var/db/repos/$my_repo_name
rm /var/cache/eix/*
emerge --metadata
eix-update

I'm using assign cache method (as suggested on the Gentoo Wiki). Maybe this tip is no longer relevant? I also found a few old repositories I'm no longer using in /var/cache/edb/dep/var/db/repos/.