On Thu, 2012-12-20 at 18:27 +0100, Ulrich Mueller wrote: > The FHS says: > > /var/cache is intended for cached data from applications. Such data > is locally generated as a result of time-consuming I/O or > calculation. The application must be able to regenerate or restore > the data. > > Now I wonder: After removal of e.g. the Portage tree from a system, it > is generally not possible to restore it. (It can be refetched, but not > to its previous state.) > > Same is true for distfiles, at least to some degree. They may have > vanished upstream or from mirrors. > > Maybe /var/lib would be a better choice? It would also take care of > the issue with fetch-restricted files.
Due to fetch-restricted files, /var/lib does make sense for distfiles. And of course /var/lib should be used for the default personal overlay (currently in /usr/local/portage). But I think that the main portage and overlay checkouts are already cache-like in the sense that any manual user changes are automatically overwritten by "emerge --sync" / "layman -S", which the users are supposed to run on a sufficiently regular basis. So /var/cache does seem like a reasonable place for them.