From caaaff3954a164155f1ee2be8a29f50cd76d1717 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 6 Jan 2016 21:49:32 +0100 Subject: Fix --repair failure on multiple-output derivations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/libstore/build.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/libstore/build.cc') diff --git a/src/libstore/build.cc b/src/libstore/build.cc index b41daac99159..931b0755bf31 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -1123,8 +1123,10 @@ void DerivationGoal::repairClosure() /* Get the output closure. */ PathSet outputClosure; - for (auto & i : drv->outputs) + for (auto & 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). */ for (auto & i : drv->outputs) -- cgit 1.4.1