From 812c0dfbe24c8fe93992f77abbf1e5a975ea42f4 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 2 Jun 2016 13:33:49 +0200 Subject: Allow setting the state directory as a store parameter E.g. "local?store=/tmp/store&state=/tmp/var". --- src/libstore/store-api.hh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/libstore/store-api.hh') diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh index 45cf7e7819a9..b665babc082c 100644 --- a/src/libstore/store-api.hh +++ b/src/libstore/store-api.hh @@ -372,10 +372,6 @@ public: `path' has disappeared. */ virtual void addIndirectRoot(const Path & path) = 0; - /* Register a permanent GC root. */ - Path addPermRoot(const Path & storePath, - const Path & gcRoot, bool indirect, bool allowOutsideRootsDir = false); - /* Acquire the global GC lock, then immediately release it. This function must be called after registering a new permanent root, but before exiting. Otherwise, it is possible that a running @@ -494,11 +490,17 @@ protected: class LocalFSStore : public Store { -protected: - using Store::Store; public: + const Path stateDir; + + LocalFSStore(const Params & params); + void narFromPath(const Path & path, Sink & sink) override; ref getFSAccessor() override; + + /* Register a permanent GC root. */ + Path addPermRoot(const Path & storePath, + const Path & gcRoot, bool indirect, bool allowOutsideRootsDir = false); }; -- cgit 1.4.1