From 20b978192e18a0ce0e34da2123a1174ebbce183c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 30 Dec 2015 01:20:41 +0100 Subject: daemon: Remove unused 'RemoteStore' class. * nix/libstore/remote-store.cc, nix/libstore/remote-store.hh: Remove. * nix/libstore/store-api.cc (readStorePath, readStorePaths): New functions, formerly in remote-store.cc. (openStore): Remove reference to 'RemoteStore'. * daemon.am (libstore_a_SOURCES): Remove remote-store.cc. (libstore_headers): Remote remote-store.hh. --- nix/libstore/store-api.cc | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'nix/libstore/store-api.cc') diff --git a/nix/libstore/store-api.cc b/nix/libstore/store-api.cc index 0238e5b0b6..30af5f5fed 100644 --- a/nix/libstore/store-api.cc +++ b/nix/libstore/store-api.cc @@ -304,13 +304,28 @@ void exportPaths(StoreAPI & store, const Paths & paths, writeInt(0, sink); } +Path readStorePath(Source & from) +{ + Path path = readString(from); + assertStorePath(path); + return path; +} + + +template T readStorePaths(Source & from) +{ + T paths = readStrings(from); + foreach (typename T::iterator, i, paths) assertStorePath(*i); + return paths; +} + +template PathSet readStorePaths(Source & from); } #include "local-store.hh" #include "serialise.hh" -#include "remote-store.hh" namespace nix { @@ -321,10 +336,7 @@ std::shared_ptr store; std::shared_ptr openStore(bool reserveSpace) { - if (getEnv("NIX_REMOTE") == "") - return std::shared_ptr(new LocalStore(reserveSpace)); - else - return std::shared_ptr(new RemoteStore()); + return std::shared_ptr(new LocalStore(reserveSpace)); } -- cgit v1.2.3