mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
* Implement RemoteStore::queryValidPaths().
This commit is contained in:
parent
e42401ee7b
commit
24035b98b1
3 changed files with 12 additions and 1 deletions
|
@ -214,7 +214,9 @@ bool RemoteStore::isValidPath(const Path & path)
|
|||
PathSet RemoteStore::queryValidPaths()
|
||||
{
|
||||
openConnection();
|
||||
throw Error("not implemented");
|
||||
writeInt(wopQueryValidPaths, to);
|
||||
processStderr();
|
||||
return readStorePaths(from);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ typedef enum {
|
|||
wopCollectGarbage = 20,
|
||||
wopQuerySubstitutablePathInfo = 21,
|
||||
wopQueryDerivationOutputs = 22,
|
||||
wopQueryValidPaths = 23,
|
||||
} WorkerOp;
|
||||
|
||||
|
||||
|
|
|
@ -520,6 +520,14 @@ static void performOp(unsigned int clientVersion,
|
|||
break;
|
||||
}
|
||||
|
||||
case wopQueryValidPaths: {
|
||||
startWork();
|
||||
PathSet paths = store->queryValidPaths();
|
||||
stopWork();
|
||||
writeStringSet(paths, to);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
throw Error(format("invalid operation %1%") % op);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue