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/binary-cache-store.hh | |
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/binary-cache-store.hh')
-rw-r--r-- | src/libstore/binary-cache-store.hh | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/libstore/binary-cache-store.hh b/src/libstore/binary-cache-store.hh index eb03c5f26da3..cc6b98525e23 100644 --- a/src/libstore/binary-cache-store.hh +++ b/src/libstore/binary-cache-store.hh @@ -46,8 +46,6 @@ private: std::string narInfoFileFor(const Path & storePath); - void addToCache(const ValidPathInfo & info, ref<std::string> nar); - public: bool isValidPathUncached(const Path & path) override; @@ -82,6 +80,9 @@ public: void querySubstitutablePathInfos(const PathSet & paths, SubstitutablePathInfos & infos) override; + void addToStore(const ValidPathInfo & info, const std::string & nar, + bool repair = false) override; + Path addToStore(const string & name, const Path & srcPath, bool recursive = true, HashType hashAlgo = htSHA256, PathFilter & filter = defaultPathFilter, bool repair = false) override; @@ -91,13 +92,6 @@ public: void narFromPath(const Path & path, Sink & sink) override; - void exportPath(const Path & path, Sink & sink) override; - - Paths importPaths(Source & source, - std::shared_ptr<FSAccessor> accessor) override; - - Path importPath(Source & source, std::shared_ptr<FSAccessor> accessor); - void buildPaths(const PathSet & paths, BuildMode buildMode = bmNormal) override; BuildResult buildDerivation(const Path & drvPath, const BasicDerivation & drv, |