* The `fixedOutput' variable didn't get initialised when using a build
hook, causing negative caching to fail randomly.
This commit is contained in:
parent
38f98b3282
commit
f54e800366
1 changed files with 6 additions and 5 deletions
|
@ -942,6 +942,11 @@ void DerivationGoal::inputsRealised()
|
||||||
|
|
||||||
allPaths.insert(inputPaths.begin(), inputPaths.end());
|
allPaths.insert(inputPaths.begin(), inputPaths.end());
|
||||||
|
|
||||||
|
/* Is this a fixed-output derivation? */
|
||||||
|
fixedOutput = true;
|
||||||
|
foreach (DerivationOutputs::iterator, i, drv.outputs)
|
||||||
|
if (i->second.hash == "") fixedOutput = false;
|
||||||
|
|
||||||
/* Okay, try to build. Note that here we don't wait for a build
|
/* Okay, try to build. Note that here we don't wait for a build
|
||||||
slot to become available, since we don't need one if there is a
|
slot to become available, since we don't need one if there is a
|
||||||
build hook. */
|
build hook. */
|
||||||
|
@ -1479,11 +1484,7 @@ void DerivationGoal::startBuilder()
|
||||||
derivation, tell the builder, so that for instance `fetchurl'
|
derivation, tell the builder, so that for instance `fetchurl'
|
||||||
can skip checking the output. On older Nixes, this environment
|
can skip checking the output. On older Nixes, this environment
|
||||||
variable won't be set, so `fetchurl' will do the check. */
|
variable won't be set, so `fetchurl' will do the check. */
|
||||||
fixedOutput = true;
|
if (fixedOutput) env["NIX_OUTPUT_CHECKED"] = "1";
|
||||||
foreach (DerivationOutputs::iterator, i, drv.outputs)
|
|
||||||
if (i->second.hash == "") fixedOutput = false;
|
|
||||||
if (fixedOutput)
|
|
||||||
env["NIX_OUTPUT_CHECKED"] = "1";
|
|
||||||
|
|
||||||
/* *Only* if this is a fixed-output derivation, propagate the
|
/* *Only* if this is a fixed-output derivation, propagate the
|
||||||
values of the environment variables specified in the
|
values of the environment variables specified in the
|
||||||
|
|
Loading…
Reference in a new issue