Skip to content

Commit

Permalink
Don't create unnecessary substitution goals for derivations
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed Nov 24, 2014
1 parent 2157454 commit 9e3389c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/libstore/build.cc
Expand Up @@ -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;
Expand Down

0 comments on commit 9e3389c

Please sign in to comment.