From e25fad691aa3ccb492c4fb8840289f76151e553e Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 2 Dec 2006 16:41:36 +0000 Subject: * Move addTempRoot() to the store API, and add another function syncWithGC() to allow clients to register GC roots without needing write access to the global roots directory or the GC lock. --- src/nix-worker/main.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/nix-worker/main.cc') diff --git a/src/nix-worker/main.cc b/src/nix-worker/main.cc index 95077e653135..fef2c2958aa9 100644 --- a/src/nix-worker/main.cc +++ b/src/nix-worker/main.cc @@ -127,6 +127,19 @@ void processConnection(Source & from, Sink & to) break; } + case wopAddTempRoot: { + Path path = readStorePath(from); + store->addTempRoot(path); + writeInt(1, to); + break; + } + + case wopSyncWithGC: { + store->syncWithGC(); + writeInt(1, to); + break; + } + default: throw Error(format("invalid operation %1%") % op); } -- cgit 1.4.1