On 10/12/15 19:32, vkr wrote:
Sorry. It is not the manifest file that it tries to update. But the ".d"
files. I think it is a real bug.

In read-only mode, when ccache tries to run cache look up in
preprocessor mode, it tries to put_file_in_cache for .d file

         if (generating_dependencies && mode == FROMCACHE_CPP_MODE) {
                 put_file_in_cache(output_dep, cached_dep);

This is buggy, as it should check also check we are in
read-only/read-only-direct mode, like so:

if (generating_dependencies && mode == FROMCACHE_CPP_MODE &&
(!conf->read_only && !conf->read_only_direct)) {

Or even better, if put_file_in_cache returns if we are in
read-only/read-only-direct mode, which should fix more such hidden
cases, in future.

I think you're right, and I'm sure Joel would appreciate a patch if you could cook one up and test it.

I'm not the maintainer, so my opinion on the placement of the fix is not interesting. I would follow whatever precedent has been set elsewhere, and only "fix" it if things are getting out of hand.


ccache mailing list

Reply via email to