From 538a64e8c314f23ba0c5d76201f1c20e71884a21 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 4 May 2016 13:36:54 +0200 Subject: 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. --- src/libstore/binary-cache-store.hh | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/libstore/binary-cache-store.hh') 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 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 accessor) override; - - Path importPath(Source & source, std::shared_ptr accessor); - void buildPaths(const PathSet & paths, BuildMode buildMode = bmNormal) override; BuildResult buildDerivation(const Path & drvPath, const BasicDerivation & drv, -- cgit 1.4.1