eix icon indicating copy to clipboard operation
eix copied to clipboard

eix lists deleted ebuilds from overlays

Open eternal-sorrow opened this issue 1 year ago • 8 comments

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

eternal-sorrow avatar Apr 24 '23 06:04 eternal-sorrow

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.

vaeth avatar Apr 24 '23 16:04 vaeth

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 avatar Apr 24 '23 21:04 eternal-sorrow

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?

eternal-sorrow avatar Apr 24 '23 21:04 eternal-sorrow

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

vaeth avatar Apr 25 '23 17:04 vaeth

Portage does it automatically after every emaint sync.

eternal-sorrow avatar Apr 26 '23 01:04 eternal-sorrow

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.

vaeth avatar Apr 28 '23 17:04 vaeth

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

eternal-sorrow avatar Jun 07 '23 02:06 eternal-sorrow