aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/derivations.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/derivations.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/derivations.hh')
-rw-r--r--src/libstore/derivations.hh4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstore/derivations.hh b/src/libstore/derivations.hh
index 4e5985fab..3d8f19aef 100644
--- a/src/libstore/derivations.hh
+++ b/src/libstore/derivations.hh
@@ -138,10 +138,14 @@ struct Derivation : BasicDerivation
2. Input placeholders are replaced with realized input store paths. */
std::optional<BasicDerivation> tryResolve(Store & store);
+ static std::optional<BasicDerivation> tryResolve(Store & store, const StorePath & drvPath);
Derivation() = default;
Derivation(const BasicDerivation & bd) : BasicDerivation(bd) { }
Derivation(BasicDerivation && bd) : BasicDerivation(std::move(bd)) { }
+
+private:
+ std::optional<BasicDerivation> tryResolveUncached(Store & store);
};