forked from lix-project/lix
Don't anticipate multiple CA outputs for now
This commit is contained in:
parent
3a9e4c3262
commit
74b251b2f3
|
@ -552,29 +552,21 @@ void LocalStore::checkDerivationOutputs(const StorePath & drvPath, const Derivat
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Don't need the answer, but do this anyways to assert is proper
|
if (derivationIsFixed(drv.type())) {
|
||||||
// combination. The code below is more general and naturally allows
|
DerivationOutputs::const_iterator out = drv.outputs.find("out");
|
||||||
// combinations that are currently prohibited.
|
if (out == drv.outputs.end())
|
||||||
drv.type();
|
throw Error("derivation '%s' does not have an output named 'out'", printStorePath(drvPath));
|
||||||
|
|
||||||
std::optional<Hash> h;
|
FileIngestionMethod method; Hash h;
|
||||||
for (auto & i : drv.outputs) {
|
out->second.parseHashInfo(method, h);
|
||||||
if (i.second.hashAlgo == "") {
|
|
||||||
if (!h) {
|
check(makeFixedOutputPath(method, h, drvName), out->second.path, "out");
|
||||||
// somewhat expensive so we do lazily
|
}
|
||||||
h = hashDerivationModulo(*this, drv, true);
|
|
||||||
}
|
else {
|
||||||
StorePath path = makeOutputPath(i.first, *h, drvName);
|
Hash h = hashDerivationModulo(*this, drv, true);
|
||||||
check(path, i.second.path, i.first);
|
for (auto & i : drv.outputs)
|
||||||
} else {
|
check(makeOutputPath(i.first, h, drvName), i.second.path, i.first);
|
||||||
if (i.second.hash == "") {
|
|
||||||
throw Error("Fixed output derivation needs hash");
|
|
||||||
}
|
|
||||||
FileIngestionMethod recursive; Hash h;
|
|
||||||
i.second.parseHashInfo(recursive, h);
|
|
||||||
StorePath path = makeFixedOutputPath(recursive, h, drvName);
|
|
||||||
check(path, i.second.path, i.first);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue