diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-05-04T11·36+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-05-04T14·15+0200 |
commit | 538a64e8c314f23ba0c5d76201f1c20e71884a21 (patch) | |
tree | 34bdfda7346d53014619cbfa33bf1398bad4b5e2 /src/libstore/remote-store.cc | |
parent | b6c768fb6a341bf1c5fe4a2d2a929415e8519b25 (diff) |
Add a Store::addToStore() variant that accepts a NAR
As a side effect, this ensures that signatures are propagated when copying paths between stores. Also refactored import/export to make use of this.
Diffstat (limited to 'src/libstore/remote-store.cc')
-rw-r--r-- | src/libstore/remote-store.cc | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc index 1616f98f00bb..1a6afe46bb01 100644 --- a/src/libstore/remote-store.cc +++ b/src/libstore/remote-store.cc @@ -326,6 +326,12 @@ Path RemoteStore::queryPathFromHashPart(const string & hashPart) } +void RemoteStore::addToStore(const ValidPathInfo & info, const std::string & nar, bool repair) +{ + throw Error("RemoteStore::addToStore() not implemented"); +} + + Path RemoteStore::addToStore(const string & name, const Path & _srcPath, bool recursive, HashType hashAlgo, PathFilter & filter, bool repair) { @@ -373,25 +379,6 @@ Path RemoteStore::addTextToStore(const string & name, const string & s, } -void RemoteStore::exportPath(const Path & path, Sink & sink) -{ - auto conn(connections->get()); - conn->to << wopExportPath << path << 0; - conn->processStderr(&sink); /* sink receives the actual data */ - readInt(conn->from); -} - - -Paths RemoteStore::importPaths(Source & source, - std::shared_ptr<FSAccessor> accessor) -{ - auto conn(connections->get()); - conn->to << wopImportPaths; - conn->processStderr(0, &source); - return readStorePaths<Paths>(conn->from); -} - - void RemoteStore::buildPaths(const PathSet & drvPaths, BuildMode buildMode) { auto conn(connections->get()); |