aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/derivations.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-06-21 21:05:37 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-06-21 21:05:37 +0000
commit3804e3df9bb479fe1d399f29d16a1aabaf352c19 (patch)
tree1dbf7b3710c1a21e7169da754407053893323a82 /src/libstore/derivations.cc
parent49308ef0397a3da04ae1822188b1fedc70a33243 (diff)
Don't anticipate hash algo without hash in derivation for now
When we merge with master, the new lack of string types make this case impossible (after parsing). Later, when we actually implemenent CA-derivations, we'll change the types to allow that.
Diffstat (limited to 'src/libstore/derivations.cc')
-rw-r--r--src/libstore/derivations.cc16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/libstore/derivations.cc b/src/libstore/derivations.cc
index 9864cf63e..f985e7ae5 100644
--- a/src/libstore/derivations.cc
+++ b/src/libstore/derivations.cc
@@ -359,21 +359,9 @@ DerivationType BasicDerivation::type() const
outputs.begin()->second.hash != "")
{
return DerivationType::CAFixed;
+ } else {
+ return DerivationType::Regular;
}
-
- auto const algo = outputs.begin()->second.hashAlgo;
- if (algo != "") {
- throw Error("Invalid mix of CA and regular outputs");
- }
- for (auto & i : outputs) {
- if (i.second.hash != "") {
- throw Error("Non-fixed-output derivation has fixed output");
- }
- if (i.second.hashAlgo != "") {
- throw Error("Invalid mix of CA and regular outputs");
- }
- }
- return DerivationType::Regular;
}