aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/local-fs-store.hh
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-03-23 10:06:45 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-07-24 09:19:44 -0400
commit60d8dd7aeaf7fc022a1b207012c94180f6732b45 (patch)
treed75c4e83665fe7852938852f3d40908aa8d30784 /src/libstore/local-fs-store.hh
parent13269ba93b7453def7084b00eb4a34ad787a7c45 (diff)
Clean up store hierarchy with `IndirectRootStore`
See the API doc comments for details.
Diffstat (limited to 'src/libstore/local-fs-store.hh')
-rw-r--r--src/libstore/local-fs-store.hh16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/libstore/local-fs-store.hh b/src/libstore/local-fs-store.hh
index 2ee2ef0c8..488109501 100644
--- a/src/libstore/local-fs-store.hh
+++ b/src/libstore/local-fs-store.hh
@@ -40,6 +40,7 @@ class LocalFSStore : public virtual LocalFSStoreConfig,
public virtual LogStore
{
public:
+ inline static std::string operationName = "Local Filesystem Store";
const static std::string drvsLogDir;
@@ -49,9 +50,20 @@ public:
ref<FSAccessor> getFSAccessor() override;
/**
- * Register a permanent GC root.
+ * Creates symlink from the `gcRoot` to the `storePath` and
+ * registers the `gcRoot` as a permanent GC root. The `gcRoot`
+ * symlink lives outside the store and is created and owned by the
+ * user.
+ *
+ * @param gcRoot The location of the symlink.
+ *
+ * @param storePath The store object being rooted. The symlink will
+ * point to `toRealPath(store.printStorePath(storePath))`.
+ *
+ * How the permanent GC root corresponding to this symlink is
+ * managed is implementation-specific.
*/
- Path addPermRoot(const StorePath & storePath, const Path & gcRoot);
+ virtual Path addPermRoot(const StorePath & storePath, const Path & gcRoot) = 0;
virtual Path getRealStoreDir() { return realStoreDir; }