From 7850d3d27910c30232dd09dd86ee8afdaad26b90 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 1 Jun 2016 14:49:12 +0200 Subject: Make the store directory a member variable of Store --- src/libstore/derivations.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/libstore/derivations.cc') diff --git a/src/libstore/derivations.cc b/src/libstore/derivations.cc index becf8524546c..8067e412adf2 100644 --- a/src/libstore/derivations.cc +++ b/src/libstore/derivations.cc @@ -81,7 +81,7 @@ Path writeDerivation(ref store, string suffix = name + drvExtension; string contents = drv.unparse(); return settings.readOnlyMode - ? computeStorePathForText(suffix, contents, references) + ? store->computeStorePathForText(suffix, contents, references) : store->addTextToStore(suffix, contents, references, repair); } @@ -336,7 +336,7 @@ PathSet BasicDerivation::outputPaths() const } -Source & operator >> (Source & in, BasicDerivation & drv) +Source & readDerivation(Source & in, Store & store, BasicDerivation & drv) { drv.outputs.clear(); auto nr = readInt(in); @@ -344,11 +344,11 @@ Source & operator >> (Source & in, BasicDerivation & drv) auto name = readString(in); DerivationOutput o; in >> o.path >> o.hashAlgo >> o.hash; - assertStorePath(o.path); + store.assertStorePath(o.path); drv.outputs[name] = o; } - drv.inputSrcs = readStorePaths(in); + drv.inputSrcs = readStorePaths(store, in); in >> drv.platform >> drv.builder; drv.args = readStrings(in); -- cgit 1.4.1