mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-12-03 19:06:16 +02:00
* Implement RemoteStore::queryDerivationOutputs().
This commit is contained in:
parent
af565c348a
commit
e42401ee7b
3 changed files with 10 additions and 3 deletions
|
@ -296,7 +296,11 @@ Path RemoteStore::queryDeriver(const Path & path)
|
|||
|
||||
PathSet RemoteStore::queryDerivationOutputs(const Path & path)
|
||||
{
|
||||
throw Error("not yet implemented");
|
||||
openConnection();
|
||||
writeInt(wopQueryDerivationOutputs, to);
|
||||
writeString(path, to);
|
||||
processStderr();
|
||||
return readStorePaths(from);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ typedef enum {
|
|||
wopSetOptions = 19,
|
||||
wopCollectGarbage = 20,
|
||||
wopQuerySubstitutablePathInfo = 21,
|
||||
wopQueryDerivationOutputs = 22,
|
||||
} WorkerOp;
|
||||
|
||||
|
||||
|
|
|
@ -313,14 +313,16 @@ static void performOp(unsigned int clientVersion,
|
|||
}
|
||||
|
||||
case wopQueryReferences:
|
||||
case wopQueryReferrers: {
|
||||
case wopQueryReferrers:
|
||||
case wopQueryDerivationOutputs: {
|
||||
Path path = readStorePath(from);
|
||||
startWork();
|
||||
PathSet paths;
|
||||
if (op == wopQueryReferences)
|
||||
store->queryReferences(path, paths);
|
||||
else
|
||||
else if (op == wopQueryReferrers)
|
||||
store->queryReferrers(path, paths);
|
||||
else paths = store->queryDerivationOutputs(path);
|
||||
stopWork();
|
||||
writeStringSet(paths, to);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue