From c5b83d8913d73ea58ff9437c41bf6bd0c6839ad0 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 16 Mar 2017 13:50:01 +0100 Subject: copyPaths(): Use queryValidPaths() to reduce SSH latency --- src/libstore/store-api.hh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/libstore/store-api.hh') diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh index 92aa8862f6..98f2803f81 100644 --- a/src/libstore/store-api.hh +++ b/src/libstore/store-api.hh @@ -324,8 +324,10 @@ protected: public: - /* Query which of the given paths is valid. */ - virtual PathSet queryValidPaths(const PathSet & paths); + /* Query which of the given paths is valid. Optionally, try to + substitute missing paths. */ + virtual PathSet queryValidPaths(const PathSet & paths, + bool maybeSubstitute = false); /* Query the set of all valid paths. Note that for some store backends, the name part of store paths may be omitted @@ -653,7 +655,7 @@ ref openStore(const std::string & uri = getEnv("NIX_REMOTE")); ref openStore(const std::string & uri, const Store::Params & params); -void copyPaths(ref from, ref to, const Paths & storePaths, bool substitute = false); +void copyPaths(ref from, ref to, const PathSet & storePaths, bool substitute = false); enum StoreType { tDaemon, -- cgit 1.4.1