mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-12-03 19:06:16 +02:00
* 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:
parent
eb2dd4815c
commit
b2b6cf3fc8
1 changed files with 9 additions and 7 deletions
|
@ -118,13 +118,15 @@ 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. */
|
||||||
Roots roots = store->findRoots();
|
if (queryBoolSetting("gc-check-reachability", true)) {
|
||||||
if (roots.find(gcRoot) == roots.end())
|
Roots roots = store->findRoots();
|
||||||
printMsg(lvlError,
|
if (roots.find(gcRoot) == roots.end())
|
||||||
format(
|
printMsg(lvlError,
|
||||||
"warning: `%1%' is not in a directory where the garbage collector looks for roots; "
|
format(
|
||||||
"therefore, `%2%' might be removed by the garbage collector")
|
"warning: `%1%' is not in a directory where the garbage collector looks for roots; "
|
||||||
% gcRoot % storePath);
|
"therefore, `%2%' might be removed by the garbage collector")
|
||||||
|
% 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
|
||||||
|
|
Loading…
Reference in a new issue