diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-08-31T11·47+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-08-31T11·47+0000 |
commit | e2e168f7c27f5239badf6e8705264bd907d6b82c (patch) | |
tree | 1fed2f2ee9c0476b5e0171a8ff5a8086a6205105 /src/libstore/local-store.hh | |
parent | 80e722278ca03bf303961e2f27487dc98d042803 (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/local-store.hh')
-rw-r--r-- | src/libstore/local-store.hh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libstore/local-store.hh b/src/libstore/local-store.hh index 3ae964f0544d..0d7ec1f4955b 100644 --- a/src/libstore/local-store.hh +++ b/src/libstore/local-store.hh @@ -5,6 +5,7 @@ #include "store-api.hh" #include "util.hh" +#include "pathlocks.hh" class sqlite3; @@ -16,8 +17,8 @@ namespace nix { /* Nix store and database schema version. Version 1 (or 0) was Nix <= 0.7. Version 2 was Nix 0.8 and 0.9. Version 3 is Nix 0.10. - Version 4 is Nix 0.11. Version 5 is Nix 0.12-0.14. Version 6 is - Nix 0.15. */ + Version 4 is Nix 0.11. Version 5 is Nix 0.12-0.16. Version 6 is + Nix 1.0. */ const int nixSchemaVersion = 6; @@ -233,6 +234,9 @@ private: void invalidatePath(const Path & path); + void verifyPath(const Path & path, const PathSet & store, + PathSet & done, PathSet & validPaths); + void upgradeStore6(); PathSet queryValidPathsOld(); ValidPathInfo queryPathInfoOld(const Path & path); @@ -244,6 +248,8 @@ private: bool isActiveTempFile(const GCState & state, const Path & path, const string & suffix); + int openGCLock(LockType lockType); + void startSubstituter(const Path & substituter, RunningSubstituter & runningSubstituter); |