forked from lix-project/lix
* Substitutes should occupy a build slot.
This commit is contained in:
parent
c4cb6ea2bc
commit
155d7c8dfa
|
@ -1218,6 +1218,7 @@ public:
|
||||||
void tryNext();
|
void tryNext();
|
||||||
void exprNormalised();
|
void exprNormalised();
|
||||||
void exprRealised();
|
void exprRealised();
|
||||||
|
void tryToRun();
|
||||||
void finished();
|
void finished();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1302,6 +1303,19 @@ void SubstitutionGoal::exprRealised()
|
||||||
{
|
{
|
||||||
debug(format("store expr realised of `%1%'") % storePath);
|
debug(format("store expr realised of `%1%'") % storePath);
|
||||||
|
|
||||||
|
state = &SubstitutionGoal::tryToRun;
|
||||||
|
worker.waitForBuildSlot(shared_from_this());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SubstitutionGoal::tryToRun()
|
||||||
|
{
|
||||||
|
/* Make sure that we are allowed to start a build. */
|
||||||
|
if (!worker.canBuildMore()) {
|
||||||
|
worker.waitForBuildSlot(shared_from_this());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* What's the substitute program? */
|
/* What's the substitute program? */
|
||||||
StoreExpr expr = storeExprFromPath(nfSub);
|
StoreExpr expr = storeExprFromPath(nfSub);
|
||||||
assert(expr.type == StoreExpr::neClosure);
|
assert(expr.type == StoreExpr::neClosure);
|
||||||
|
@ -1390,7 +1404,7 @@ void SubstitutionGoal::exprRealised()
|
||||||
/* parent */
|
/* parent */
|
||||||
logPipe.writeSide.close();
|
logPipe.writeSide.close();
|
||||||
worker.childStarted(shared_from_this(),
|
worker.childStarted(shared_from_this(),
|
||||||
pid, logPipe.readSide, false);
|
pid, logPipe.readSide, true);
|
||||||
|
|
||||||
state = &SubstitutionGoal::finished;
|
state = &SubstitutionGoal::finished;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue