* 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)
|
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,
|
wopSetOptions = 19,
|
||||||
wopCollectGarbage = 20,
|
wopCollectGarbage = 20,
|
||||||
wopQuerySubstitutablePathInfo = 21,
|
wopQuerySubstitutablePathInfo = 21,
|
||||||
|
wopQueryDerivationOutputs = 22,
|
||||||
} WorkerOp;
|
} WorkerOp;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -313,14 +313,16 @@ static void performOp(unsigned int clientVersion,
|
||||||
}
|
}
|
||||||
|
|
||||||
case wopQueryReferences:
|
case wopQueryReferences:
|
||||||
case wopQueryReferrers: {
|
case wopQueryReferrers:
|
||||||
|
case wopQueryDerivationOutputs: {
|
||||||
Path path = readStorePath(from);
|
Path path = readStorePath(from);
|
||||||
startWork();
|
startWork();
|
||||||
PathSet paths;
|
PathSet paths;
|
||||||
if (op == wopQueryReferences)
|
if (op == wopQueryReferences)
|
||||||
store->queryReferences(path, paths);
|
store->queryReferences(path, paths);
|
||||||
else
|
else if (op == wopQueryReferrers)
|
||||||
store->queryReferrers(path, paths);
|
store->queryReferrers(path, paths);
|
||||||
|
else paths = store->queryDerivationOutputs(path);
|
||||||
stopWork();
|
stopWork();
|
||||||
writeStringSet(paths, to);
|
writeStringSet(paths, to);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue