* Undocumented option `gc-check-reachability' to allow reachability

checking to be turned off on machines with way too many roots.
This commit is contained in:
Eelco Dolstra 2007-03-19 09:16:47 +00:00
parent eb2dd4815c
commit b2b6cf3fc8

View file

@ -118,6 +118,7 @@ Path addPermRoot(const Path & _storePath, const Path & _gcRoot,
} }
/* Check that the root can be found by the garbage collector. */ /* Check that the root can be found by the garbage collector. */
if (queryBoolSetting("gc-check-reachability", true)) {
Roots roots = store->findRoots(); Roots roots = store->findRoots();
if (roots.find(gcRoot) == roots.end()) if (roots.find(gcRoot) == roots.end())
printMsg(lvlError, printMsg(lvlError,
@ -125,6 +126,7 @@ Path addPermRoot(const Path & _storePath, const Path & _gcRoot,
"warning: `%1%' is not in a directory where the garbage collector looks for roots; " "warning: `%1%' is not in a directory where the garbage collector looks for roots; "
"therefore, `%2%' might be removed by the garbage collector") "therefore, `%2%' might be removed by the garbage collector")
% gcRoot % storePath); % gcRoot % storePath);
}
/* Grab the global GC root, causing us to block while a GC is in /* Grab the global GC root, causing us to block while a GC is in
progress. This prevents the set of permanent roots from progress. This prevents the set of permanent roots from