diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-11-24 16:44:35 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-11-24 16:50:46 +0100 |
commit | 9e3389c3378df026dcbf66adef8e52002c7b9d2a (patch) | |
tree | 2301311a29def24cc8c3ce16bc6d66695d708156 /src/libstore/build.cc | |
parent | 215745415e7c1e31cdb9747a02d217a884484c51 (diff) |
Don't create unnecessary substitution goals for derivations
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r-- | src/libstore/build.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 24576f670..72694cfbb 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -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; |