mirror of
https://https.git.savannah.gnu.org/git/guix.git/
synced 2025-07-14 02:50:45 +02:00
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.
This commit is contained in:
parent
11afbbc651
commit
20b978192e
4 changed files with 17 additions and 752 deletions
|
@ -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<class T> T readStorePaths(Source & from)
|
||||
{
|
||||
T paths = readStrings<T>(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<StoreAPI> store;
|
|||
|
||||
std::shared_ptr<StoreAPI> openStore(bool reserveSpace)
|
||||
{
|
||||
if (getEnv("NIX_REMOTE") == "")
|
||||
return std::shared_ptr<StoreAPI>(new LocalStore(reserveSpace));
|
||||
else
|
||||
return std::shared_ptr<StoreAPI>(new RemoteStore());
|
||||
return std::shared_ptr<StoreAPI>(new LocalStore(reserveSpace));
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue