On 2008/06/10, Ciaran McCreesh <[EMAIL PROTECTED]> wrote: > Currently we don't touch the ebuild's content *at all* for metadata > operations, except where there's no or stale metadata cache (which is > rare). We can get away with this currently because 0 and 1 have > identical cache layouts and PMS has some (necessary) weasel wording; > future EAPIs likely won't, so we're back to the chicken / egg problem. > > So... We either have the EAPI from the extension (which we already > have, since we have to read the dir to know what versions are > available), in which case we know how to read the metadata cache file. > Or we have to open up a file that would otherwise not be opened, just > to parse one line so we know how to read the cache file.
Or you apply to future EAPI's cache formats one of the solutions that have been proposed for the ebuild side of the very same "chicken / egg problem": for instance, you could use $EAPI as cache filename extension. And that's it, you can get EAPI from the cache, hence no more extra reading of ebuild files, and no more perfs issues. It sounds so simple, am I missing something obvious? -- TGL. -- gentoo-dev@lists.gentoo.org mailing list