From 2bbc4a214ee998816921cefb2d69f30d5f277d12 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 3 Oct 2012 15:35:42 -0400 Subject: nix-env: Support ‘--repair’ flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libstore/build.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/libstore/build.cc') diff --git a/src/libstore/build.cc b/src/libstore/build.cc index b62991dff0f3..d05ff75064fe 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -1105,8 +1105,10 @@ void DerivationGoal::repairClosure() if (worker.store.pathContentsGood(*i)) continue; printMsg(lvlError, format("found corrupted or missing path `%1%' in the output closure of `%2%'") % *i % drvPath); Path drvPath2 = outputsToDrv[*i]; - if (drvPath2 == "") throw Error(format("don't know how to repair corrupted or missing path `%1%'") % *i); - addWaitee(worker.makeDerivationGoal(drvPath2, true)); + if (drvPath2 == "") + addWaitee(worker.makeSubstitutionGoal(*i, true)); + else + addWaitee(worker.makeDerivationGoal(drvPath2, true)); } if (waitees.empty()) { -- cgit 1.4.1