summaryrefslogtreecommitdiff
path: root/nix/libstore/build.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-01-06 21:49:32 +0100
committerLudovic Courtès <ludo@gnu.org>2016-05-31 14:25:28 +0200
commit1a9574e3a73e6ec1641c7238d87e45d00b862283 (patch)
treea7141b983d296edd1376c5ab88ef400821e56344 /nix/libstore/build.cc
parent63a5be07e252904eeb83a88dce37008e1affec1a (diff)
downloadpatches-1a9574e3a73e6ec1641c7238d87e45d00b862283.tar
patches-1a9574e3a73e6ec1641c7238d87e45d00b862283.tar.gz
daemon: Fix --repair failure on multiple-output derivations.
If repair found a corrupted/missing path that depended on a multiple-output derivation, and some of the outputs of the latter were not present, it failed with a message like error: path ‘/nix/store/cnfn9d5fjys1y93cz9shld2xwaibd7nn-bash-4.3-p42-doc’ is not valid Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'nix/libstore/build.cc')
-rw-r--r--nix/libstore/build.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc
index f0f60d7df1..bbcb55a0b9 100644
--- a/nix/libstore/build.cc
+++ b/nix/libstore/build.cc
@@ -1106,8 +1106,10 @@ void DerivationGoal::repairClosure()
/* Get the output closure. */
PathSet outputClosure;
- foreach (DerivationOutputs::iterator, i, drv.outputs)
+ foreach (DerivationOutputs::iterator, i, drv.outputs) {
+ if (!wantOutput(i->first, wantedOutputs)) continue;
computeFSClosure(worker.store, i->second.path, outputClosure);
+ }
/* Filter out our own outputs (which we have already checked). */
foreach (DerivationOutputs::iterator, i, drv.outputs)