about summary refs log tree commit diff
path: root/src/libstore/local-store.hh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-06-02T11·33+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-06-02T14·02+0200
commit812c0dfbe24c8fe93992f77abbf1e5a975ea42f4 (patch)
treed69bcc87ce446f270f6b01f7069655223d52a626 /src/libstore/local-store.hh
parentf2682e6e18a76ecbfb8a12c17e3a0ca15c084197 (diff)
Allow setting the state directory as a store parameter
E.g. "local?store=/tmp/store&state=/tmp/var".
Diffstat (limited to 'src/libstore/local-store.hh')
-rw-r--r--src/libstore/local-store.hh12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/libstore/local-store.hh b/src/libstore/local-store.hh
index eb5fcf83360b..5166c04e5319 100644
--- a/src/libstore/local-store.hh
+++ b/src/libstore/local-store.hh
@@ -73,6 +73,7 @@ private:
 
     Sync<State, std::recursive_mutex> _state;
 
+    const Path dbDir;
     const Path linksDir;
     const Path reservedPath;
     const Path schemaPath;
@@ -146,6 +147,15 @@ public:
 
     void syncWithGC() override;
 
+private:
+
+    typedef std::shared_ptr<AutoCloseFD> FDPtr;
+    typedef list<FDPtr> FDs;
+
+    void readTempRoots(PathSet & tempRoots, FDs & fds);
+
+public:
+
     Roots findRoots() override;
 
     void collectGarbage(const GCOptions & options, GCResults & results) override;
@@ -179,8 +189,6 @@ public:
 
     void addSignatures(const Path & storePath, const StringSet & sigs) override;
 
-    static bool haveWriteAccess();
-
 private:
 
     int getSchema();