diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-07-27 16:48:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-27 16:48:41 +0200 |
commit | a5f7d310dd10fe86b6f6aa1c2771c30f113741d4 (patch) | |
tree | ed365ca233fa7edfba9551539c4a903f109abef0 /src/libstore/local-store.cc | |
parent | d7c0f094cbcfe1ae4ccc3d54baec00b66ccb1ed0 (diff) | |
parent | d5bb67cfa4da130a9949a9b4eb8aba6cb74ea5c7 (diff) |
Merge pull request #3795 from obsidiansystems/optional-derivation-output-storepath
Only store hash in DerivationOutput for fixed output derivations
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r-- | src/libstore/local-store.cc | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index 9ea71170f..1e6b34cd1 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -560,19 +560,12 @@ void LocalStore::checkDerivationOutputs(const StorePath & drvPath, const Derivat DerivationOutputs::const_iterator out = drv.outputs.find("out"); if (out == drv.outputs.end()) throw Error("derivation '%s' does not have an output named 'out'", printStorePath(drvPath)); - - check( - makeFixedOutputPath( - out->second.hash->method, - out->second.hash->hash, - drvName), - out->second.path, "out"); } else { Hash h = hashDerivationModulo(*this, drv, true); for (auto & i : drv.outputs) - check(makeOutputPath(i.first, h, drvName), i.second.path, i.first); + check(makeOutputPath(i.first, h, drvName), i.second.path(*this, drv.name), i.first); } } @@ -614,7 +607,7 @@ uint64_t LocalStore::addValidPath(State & state, state.stmtAddDerivationOutput.use() (id) (i.first) - (printStorePath(i.second.path)) + (printStorePath(i.second.path(*this, drv.name))) .exec(); } } |