guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

116/118: Don't create unnecessary substitution goals for derivations


From: Ludovic Courtès
Subject: 116/118: Don't create unnecessary substitution goals for derivations
Date: Tue, 19 May 2015 14:46:07 +0000

civodul pushed a commit to branch nix
in repository guix.

commit 9f355738e106f4ca49bba7276e8d520a2fc2955d
Author: Eelco Dolstra <address@hidden>
Date:   Mon Nov 24 16:44:35 2014 +0100

    Don't create unnecessary substitution goals for derivations
---
 nix/libstore/build.cc |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc
index 17085ad..952dbd2 100644
--- a/nix/libstore/build.cc
+++ b/nix/libstore/build.cc
@@ -936,6 +936,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;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]