aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/store-api.hh
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2020-12-17 11:35:24 +0100
committerregnat <rg@regnat.ovh>2020-12-17 11:35:24 +0100
commit4d458394991f3086c3c9c306d000e6c0058c4fa7 (patch)
treeb8770e3a76b43b0e38e5b42bb94435257e34e1a8 /src/libstore/store-api.hh
parentae3c3e3bb29cce34c98320f1fce4da63436f2bc8 (diff)
Fix the detection of already built drv outputs
PRs #4370 and #4348 had a bad interaction in that the second broke the fist one in a not trivial way. The issue was that since #4348 the logic for detecting whether a derivation output is already built requires some logic that was specific to the `LocalStore`. It happens though that most of this logic could be upstreamed to any `Store`, which is what this commit does.
Diffstat (limited to 'src/libstore/store-api.hh')
-rw-r--r--src/libstore/store-api.hh9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh
index 7cdadc1f3..ce95b78b1 100644
--- a/src/libstore/store-api.hh
+++ b/src/libstore/store-api.hh
@@ -416,8 +416,13 @@ public:
/* Query the mapping outputName => outputPath for the given derivation. All
outputs are mentioned so ones mising the mapping are mapped to
`std::nullopt`. */
- virtual std::map<std::string, std::optional<StorePath>> queryPartialDerivationOutputMap(const StorePath & path)
- { unsupported("queryPartialDerivationOutputMap"); }
+ virtual std::map<std::string, std::optional<StorePath>> queryPartialDerivationOutputMap(const StorePath & path);
+
+ /*
+ * Similar to `queryPartialDerivationOutputMap`, but doesn't try to resolve
+ * the derivation
+ */
+ virtual std::map<std::string, std::optional<StorePath>> queryDerivationOutputMapNoResolve(const StorePath & path);
/* Query the mapping outputName=>outputPath for the given derivation.
Assume every output has a mapping and throw an exception otherwise. */