Summary: | app-portage/portage-utils - qwhich returns bogus results when md5-cache missing | ||
---|---|---|---|
Product: | Portage Development | Reporter: | James Le Cuirot <chewi> |
Component: | Unclassified | Assignee: | Portage Utils Team <portage-utils> |
Status: | CONFIRMED --- | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
James Le Cuirot
2024-06-19 13:29:08 UTC
thanks, let me check that later in the tree with md5-cache missing, do you have a metadata/md5-cache directory? oh and q -o might help here too, qwhich loops over all overlays by default, so it will report latest from each. That said, the difference in behaviour still makes no sense (yet). I first hit this on the Gentoo-derivative Flatcar Linux, which hasn't bothered generating a cache in some time because it only has a relatively small set of packages in its repos. However, I can still reproduce it on Gentoo. I demonstrated this by renaming metadata/md5-cache. If I create an empty md5-cache directory, then I get no results at all. I do normally have a few overlays on my system, but these packages only exist in the main gentoo repo. If I rename /etc/portage/repos.conf so that it only sees the default main repo, the behaviour remains the same. I still get an additional result, even though "q -o" only lists one repository. Ok, that provides some hints. portage-utils doesn't validate the (md5) cache, it just assumes it is correct. Perhaps it is time to do the extra work to ensure the cache is sane. It's supposed to work when there is no cache. You will find that there this a lot of code for handling ebuilds directly where cachetype is CACHE_EBUILD rather than CACHE_METADATA_MD5. This code probably doesn't get tested very often. |