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/local-store.hh | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/libstore/local-store.hh') diff --git a/src/libstore/local-store.hh b/src/libstore/local-store.hh index d3cde7408153..e714f8e0feb1 100644 --- a/src/libstore/local-store.hh +++ b/src/libstore/local-store.hh @@ -112,6 +112,9 @@ public: void querySubstitutablePathInfos(const PathSet & paths, SubstitutablePathInfos & infos) override; + void addToStore(const ValidPathInfo & info, const std::string & nar, + bool repair) override; + Path addToStore(const string & name, const Path & srcPath, bool recursive = true, HashType hashAlgo = htSHA256, PathFilter & filter = defaultPathFilter, bool repair = false) override; @@ -126,11 +129,6 @@ public: Path addTextToStore(const string & name, const string & s, const PathSet & references, bool repair = false) override; - void exportPath(const Path & path, Sink & sink) override; - - Paths importPaths(Source & source, - std::shared_ptr accessor) override; - void buildPaths(const PathSet & paths, BuildMode buildMode) override; BuildResult buildDerivation(const Path & drvPath, const BasicDerivation & drv, @@ -229,8 +227,6 @@ private: Path createTempDirInStore(); - Path importPath(Source & source); - void checkDerivationOutputs(const Path & drvPath, const Derivation & drv); typedef std::unordered_set InodeHash; -- cgit 1.4.1