[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/09: daemon: When repairing, rebuild if there is no substituter.
From: |
Ludovic Courtès |
Subject: |
04/09: daemon: When repairing, rebuild if there is no substituter. |
Date: |
Tue, 31 May 2016 12:34:01 +0000 (UTC) |
civodul pushed a commit to branch master
in repository guix.
commit c56cd90cc93898ce4633cebc6ec5e490eb10fce4
Author: Eelco Dolstra <address@hidden>
Date: Wed Jan 6 22:07:59 2016 +0100
daemon: When repairing, rebuild if there is no substituter.
---
nix/libstore/build.cc | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc
index bbcb55a..2f8b4da 100644
--- a/nix/libstore/build.cc
+++ b/nix/libstore/build.cc
@@ -3482,8 +3482,17 @@ void LocalStore::repairPath(const Path & path)
worker.run(goals);
- if (goal->getExitCode() != Goal::ecSuccess)
- throw Error(format("cannot repair path `%1%'") % path,
worker.exitStatus());
+ if (goal->getExitCode() != Goal::ecSuccess) {
+ /* Since substituting the path didn't work, if we have a valid
+ deriver, then rebuild the deriver. */
+ Path deriver = queryDeriver(path);
+ if (deriver != "" && isValidPath(deriver)) {
+ goals.clear();
+ goals.insert(worker.makeDerivationGoal(deriver, StringSet(),
bmRepair));
+ worker.run(goals);
+ } else
+ throw Error(format("cannot repair path `%1%'") % path,
worker.exitStatus());
+ }
}
- branch master updated (8fe5d95 -> b452811), Ludovic Courtès, 2016/05/31
- 02/09: daemon: ~PathLocks(): Handle exceptions., Ludovic Courtès, 2016/05/31
- 07/09: daemon: check: Keep the differing output if -K is given., Ludovic Courtès, 2016/05/31
- 08/09: daemon: Canonicalize gids to 0., Ludovic Courtès, 2016/05/31
- 09/09: daemon: rounds: Keep the differing output if -K is given., Ludovic Courtès, 2016/05/31
- 05/09: daemon: check: Fix assertion failure when some outputs are missing., Ludovic Courtès, 2016/05/31
- 01/09: daemon: Handle /tmp being a symlink., Ludovic Courtès, 2016/05/31
- 03/09: daemon: Fix --repair failure on multiple-output derivations., Ludovic Courtès, 2016/05/31
- 06/09: daemon: check: Fix "failed to produce output path"., Ludovic Courtès, 2016/05/31
- 04/09: daemon: When repairing, rebuild if there is no substituter.,
Ludovic Courtès <=