From 9e3389c3378df026dcbf66adef8e52002c7b9d2a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 24 Nov 2014 16:44:35 +0100 Subject: Don't create unnecessary substitution goals for derivations --- src/libstore/build.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/libstore') 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; -- cgit v1.2.3