diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2007-03-19 09:16:47 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2007-03-19 09:16:47 +0000 |
commit | b2b6cf3fc83f0e1625214ae31b0b088a266234bf (patch) | |
tree | 6cdbe3deaaf4431ac75fd80586d0d979aafd05e5 /src/libstore/gc.cc | |
parent | eb2dd4815c05fcc592d049bddcd2f42d13216eab (diff) |
* Undocumented option `gc-check-reachability' to allow reachability
checking to be turned off on machines with way too many roots.
Diffstat (limited to 'src/libstore/gc.cc')
-rw-r--r-- | src/libstore/gc.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc index 2c75b16f6..e04e9c107 100644 --- a/src/libstore/gc.cc +++ b/src/libstore/gc.cc @@ -118,13 +118,15 @@ Path addPermRoot(const Path & _storePath, const Path & _gcRoot, } /* Check that the root can be found by the garbage collector. */ - Roots roots = store->findRoots(); - if (roots.find(gcRoot) == roots.end()) - printMsg(lvlError, - format( - "warning: `%1%' is not in a directory where the garbage collector looks for roots; " - "therefore, `%2%' might be removed by the garbage collector") - % gcRoot % storePath); + if (queryBoolSetting("gc-check-reachability", true)) { + Roots roots = store->findRoots(); + if (roots.find(gcRoot) == roots.end()) + printMsg(lvlError, + format( + "warning: `%1%' is not in a directory where the garbage collector looks for roots; " + "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 progress. This prevents the set of permanent roots from |