forked from lix-project/lix
* Don't cache transient build hook problems.
This commit is contained in:
parent
435a93b5d8
commit
dfb863f333
|
@ -1161,11 +1161,14 @@ void DerivationGoal::buildDone()
|
||||||
outputLocks.unlock();
|
outputLocks.unlock();
|
||||||
buildUser.release();
|
buildUser.release();
|
||||||
|
|
||||||
|
/* When using a build hook, the hook will return a remote
|
||||||
|
build failure using exit code 100. Anything else is a hook
|
||||||
|
problem. */
|
||||||
|
bool hookError = usingBuildHook &&
|
||||||
|
(!WIFEXITED(status) || WEXITSTATUS(status) != 100);
|
||||||
|
|
||||||
if (printBuildTrace) {
|
if (printBuildTrace) {
|
||||||
/* When using a build hook, the hook will return a
|
if (usingBuildHook && hookError)
|
||||||
remote build failure using exit code 100. Anything
|
|
||||||
else is a hook problem. */
|
|
||||||
if (usingBuildHook && (!WIFEXITED(status) || WEXITSTATUS(status) != 100))
|
|
||||||
printMsg(lvlError, format("@ hook-failed %1% %2% %3% %4%")
|
printMsg(lvlError, format("@ hook-failed %1% %2% %3% %4%")
|
||||||
% drvPath % drv.outputs["out"].path % status % e.msg());
|
% drvPath % drv.outputs["out"].path % status % e.msg());
|
||||||
else
|
else
|
||||||
|
@ -1177,8 +1180,10 @@ void DerivationGoal::buildDone()
|
||||||
try to build them again (negative caching). However, don't
|
try to build them again (negative caching). However, don't
|
||||||
do this for fixed-output derivations, since they're likely
|
do this for fixed-output derivations, since they're likely
|
||||||
to fail for transient reasons (e.g., fetchurl not being
|
to fail for transient reasons (e.g., fetchurl not being
|
||||||
able to access the network). */
|
able to access the network). Hook errors (like
|
||||||
if (worker.cacheFailure && !fixedOutput)
|
communication problems with the remote machine) shouldn't
|
||||||
|
be cached either. */
|
||||||
|
if (worker.cacheFailure && !hookError && !fixedOutput)
|
||||||
foreach (DerivationOutputs::iterator, i, drv.outputs)
|
foreach (DerivationOutputs::iterator, i, drv.outputs)
|
||||||
worker.store.registerFailedPath(i->second.path);
|
worker.store.registerFailedPath(i->second.path);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue