aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-06-24 15:41:29 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-06-24 15:41:29 +0000
commitd9fb9e9f26e29d9d9001af700deada32ca740cf6 (patch)
treea288f855e465f7abf8bd5c09c40af98213c74e03 /src/libstore/build.cc
parent93bbe6e8ab9ae4b76942a2acafa072483be20807 (diff)
parent3c50e84387e51858f10c540e721a938592f30949 (diff)
Merge remote-tracking branch 'upstream/master' into ca-drv
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r--src/libstore/build.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index ab729fc68..80992a7cd 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -3714,7 +3714,7 @@ void DerivationGoal::registerOutputs()
/* Check that fixed-output derivations produced the right
outputs (i.e., the content hash should match the specified
hash). */
- std::string ca;
+ std::optional<ContentAddress> ca;
if (derivationIsFixed(derivationType)) {
@@ -3764,7 +3764,10 @@ void DerivationGoal::registerOutputs()
else
assert(worker.store.parseStorePath(path) == dest);
- ca = makeFixedOutputCA(i.second.hash->method, h2);
+ ca = FixedOutputHash {
+ .method = i.second.hash->method,
+ .hash = h2,
+ };
}
/* Get rid of all weird permissions. This also checks that
@@ -3837,7 +3840,10 @@ void DerivationGoal::registerOutputs()
info.ca = ca;
worker.store.signPathInfo(info);
- if (!info.references.empty()) info.ca.clear();
+ if (!info.references.empty()) {
+ // FIXME don't we have an experimental feature for fixed output with references?
+ info.ca = {};
+ }
infos.emplace(i.first, std::move(info));
}