aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2020-12-16 13:36:17 +0100
committerregnat <rg@regnat.ovh>2020-12-16 13:36:17 +0100
commitcac8d5b742ec0cb80ad7232e20f63c74a217e545 (patch)
tree665863c3556f44ccc2f99aca48d62f45c7a4857c /src
parent3765174691590e690296284f717a6f3a326e3345 (diff)
Don't ignore an absent drv file in queryPartialDrvOutputMap
This ignore was here because `queryPartialDrvOutputMap` was used both 1. as a cache to avoid having to re-read the derivation (when gc-ing for example), and 2. as the source of truth for ca realisations The use-case 2. required it to be able to work even when the derivation wasn't there anymore (see https://github.com/NixOS/nix/issues/4138). However, this use-case is now handled by `queryRealisation`, meaning that we can safely error out if the derivation isn't there anymore
Diffstat (limited to 'src')
-rw-r--r--src/libstore/local-store.cc7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index 1539c94e2..20bbc73cf 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -912,12 +912,7 @@ LocalStore::queryPartialDerivationOutputMap(const StorePath& path_)
auto state(_state.lock());
std::map<std::string, std::optional<StorePath>> outputs;
uint64_t drvId;
- try {
- drvId = queryValidPathId(*state, path);
- } catch (InvalidPath&) {
- // Ignore non-existing drvs as they might still have an output map
- // defined if ca-derivations is enabled
- }
+ drvId = queryValidPathId(*state, path);
auto use(state->stmts->QueryDerivationOutputs.use()(drvId));
while (use.next())
outputs.insert_or_assign(