From f58f51f38007f8bfb1089c3b4c88b6e66da15f39 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 24 Aug 2010 11:45:44 +0000 Subject: [PATCH] * Handle the unlikely case where a derivation has no dependencies at all. --- src/libstore/build.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 6f02762442..5617eccf1f 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -887,7 +887,10 @@ void DerivationGoal::outputsSubstituted() foreach (PathSet::iterator, i, drv.inputSrcs) addWaitee(worker.makeSubstitutionGoal(*i)); - state = &DerivationGoal::inputsRealised; + if (waitees.empty()) /* to prevent hang (no wake-up event) */ + inputsRealised(); + else + state = &DerivationGoal::inputsRealised; }