* Implement RemoteStore::queryPathInfo().

This commit is contained in:
Eelco Dolstra 2010-11-17 12:08:01 +00:00
parent a3883cbd28
commit 1db6259076
3 changed files with 27 additions and 1 deletions

View file

@ -249,7 +249,19 @@ bool RemoteStore::querySubstitutablePathInfo(const Path & path,
ValidPathInfo RemoteStore::queryPathInfo(const Path & path)
{
throw Error("not implemented");
openConnection();
writeInt(wopQueryPathInfo, to);
writeString(path, to);
processStderr();
ValidPathInfo info;
info.path = path;
info.deriver = readString(from);
if (info.deriver != "") assertStorePath(info.deriver);
info.hash = parseHash(htSHA256, readString(from));
info.references = readStorePaths(from);
info.registrationTime = readInt(from);
info.narSize = readLongLong(from);
return info;
}

View file

@ -38,6 +38,7 @@ typedef enum {
wopQueryValidPaths = 23,
wopQueryFailedPaths = 24,
wopClearFailedPaths = 25,
wopQueryPathInfo = 26,
} WorkerOp;