about summary refs log tree commit diff
path: root/src/libstore/gc.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-08-31T11·47+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-08-31T11·47+0000
commite2e168f7c27f5239badf6e8705264bd907d6b82c (patch)
tree1fed2f2ee9c0476b5e0171a8ff5a8086a6205105 /src/libstore/gc.cc
parent80e722278ca03bf303961e2f27487dc98d042803 (diff)
`nix-store --verify' improvements:
* If a path has disappeared, check its referrers first, and don't try
  to invalidate paths that have valid referrers.  Otherwise we get a
  foreign key constraint violation.
* Read the whole Nix store directory instead of statting each valid
  path, which is slower.
* Acquire the global GC lock.

Diffstat (limited to 'src/libstore/gc.cc')
-rw-r--r--src/libstore/gc.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc
index ea784bcd90..7d58cd50af 100644
--- a/src/libstore/gc.cc
+++ b/src/libstore/gc.cc
@@ -1,6 +1,5 @@
 #include "globals.hh"
 #include "misc.hh"
-#include "pathlocks.hh"
 #include "local-store.hh"
 
 #include <boost/shared_ptr.hpp>
@@ -31,7 +30,7 @@ static const int defaultGcLevel = 1000;
    read.  To be precise: when they try to create a new temporary root
    file, they will block until the garbage collector has finished /
    yielded the GC lock. */
-static int openGCLock(LockType lockType)
+int LocalStore::openGCLock(LockType lockType)
 {
     Path fnGCLock = (format("%1%/%2%")
         % nixStateDir % gcLockName).str();