[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/09: daemon: check: Fix assertion failure when some outputs are missin
From: |
Ludovic Courtès |
Subject: |
05/09: daemon: check: Fix assertion failure when some outputs are missing. |
Date: |
Tue, 31 May 2016 12:34:02 +0000 (UTC) |
civodul pushed a commit to branch master
in repository guix.
commit f83e82cd00653b443b180ad100886bd096209b83
Author: Eelco Dolstra <address@hidden>
Date: Tue Jan 12 14:54:39 2016 +0100
daemon: check: Fix assertion failure when some outputs are missing.
E.g.
$ nix-build pkgs/stdenv/linux/ -A stage1.pkgs.perl --check
nix-store: src/libstore/build.cc:1323: void
nix::DerivationGoal::tryToBuild(): Assertion `buildMode != bmCheck ||
validPaths.size() == drv->outputs.size()' failed.
when perl.out exists but perl.man doesn't. The fix is to only check
the outputs that exist. Note that "nix-build -A stage1.pkgs.all
--check" will still give a (proper) error in this case.
---
nix/libstore/build.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc
index 2f8b4da..07babf9 100644
--- a/nix/libstore/build.cc
+++ b/nix/libstore/build.cc
@@ -1291,7 +1291,6 @@ void DerivationGoal::tryToBuild()
now hold the locks on the output paths, no other process can
build this derivation, so no further checks are necessary. */
validPaths = checkPathValidity(true, buildMode == bmRepair);
- assert(buildMode != bmCheck || validPaths.size() == drv.outputs.size());
if (buildMode != bmCheck && validPaths.size() == drv.outputs.size()) {
debug(format("skipping build of derivation `%1%', someone beat us to
it") % drvPath);
outputLocks.setDeletion(true);
@@ -2430,6 +2429,7 @@ void DerivationGoal::registerOutputs()
PathSet references = scanForReferences(actualPath, allPaths, hash);
if (buildMode == bmCheck) {
+ if (!store->isValidPath(path)) continue;
ValidPathInfo info = worker.store.queryPathInfo(path);
if (hash.first != info.hash)
throw Error(format("derivation `%1%' may not be deterministic:
hash mismatch in output `%2%'") % drvPath % path);
- 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 <=
- 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, 2016/05/31