Don't create unnecessary substitution goals for derivations

This commit is contained in:
Eelco Dolstra
2014-11-24 16:50:46 +01:00
parent 215745415e
commit 9e3389c337
+5
View File
@@ -924,6 +924,11 @@ void DerivationGoal::init()
/* The first thing to do is to make sure that the derivation
exists. If it doesn't, it may be created through a
substitute. */
if (buildMode == bmNormal && worker.store.isValidPath(drvPath)) {
haveDerivation();
return;
}
addWaitee(worker.makeSubstitutionGoal(drvPath));
state = &DerivationGoal::haveDerivation;