diff options
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/remote-store.cc | 14 | ||||
-rw-r--r-- | src/libstore/worker-protocol.hh | 1 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc index 517c886b4f9b..08969a623d14 100644 --- a/src/libstore/remote-store.cc +++ b/src/libstore/remote-store.cc @@ -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; } diff --git a/src/libstore/worker-protocol.hh b/src/libstore/worker-protocol.hh index a4dc690b74d9..2764f82c2ce0 100644 --- a/src/libstore/worker-protocol.hh +++ b/src/libstore/worker-protocol.hh @@ -38,6 +38,7 @@ typedef enum { wopQueryValidPaths = 23, wopQueryFailedPaths = 24, wopClearFailedPaths = 25, + wopQueryPathInfo = 26, } WorkerOp; |