diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2022-04-19 22:27:21 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2022-04-19 22:27:21 +0000 |
commit | 55caef36ed1cee2e924c82cf49b3ceb17bdde910 (patch) | |
tree | 78af86998140b242713a2c54f35bad45b4cc4449 /src/libstore/local-store.cc | |
parent | 13c669105ca93d28ca1a78321f07fd4ddbb445b1 (diff) | |
parent | ee57f91413c9d01f1027eccbe01f7706c94919ac (diff) |
Merge remote-tracking branch 'upstream/master' into path-info
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r-- | src/libstore/local-store.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index fd7106e40..40133cd0c 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -695,16 +695,15 @@ void LocalStore::checkDerivationOutputs(const StorePath & drvPath, const Derivat // combinations that are currently prohibited. drv.type(); - std::optional<Hash> h; + std::optional<DrvHash> hashesModulo; for (auto & i : drv.outputs) { std::visit(overloaded { [&](const DerivationOutput::InputAddressed & doia) { - if (!h) { + if (!hashesModulo) { // somewhat expensive so we do lazily - auto h0 = hashDerivationModulo(*this, drv, true); - h = h0.requireNoFixedNonDeferred(); + hashesModulo = hashDerivationModulo(*this, drv, true); } - StorePath recomputed = makeOutputPath(i.first, *h, drvName); + StorePath recomputed = makeOutputPath(i.first, hashesModulo->hashes.at(i.first), drvName); if (doia.path != recomputed) throw Error("derivation '%s' has incorrect output '%s', should be '%s'", printStorePath(drvPath), printStorePath(doia.path), printStorePath(recomputed)); @@ -720,6 +719,9 @@ void LocalStore::checkDerivationOutputs(const StorePath & drvPath, const Derivat [&](const DerivationOutput::Deferred &) { /* Nothing to check */ }, + [&](const DerivationOutput::Impure &) { + /* Nothing to check */ + }, }, i.second.raw()); } } |