aboutsummaryrefslogtreecommitdiff
path: root/nix/libstore/build.cc
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2017-06-03 17:51:21 +0200
committerMarius Bakke <mbakke@fastmail.com>2017-06-03 17:51:21 +0200
commitd0c45d2d822fdf31b8a8edc73fe7be12a0676705 (patch)
tree04ae8108a67013fce99273db4582c29e7845f0a7 /nix/libstore/build.cc
parent0b70f7d557181febd80b16c8e3a03887df3871af (diff)
parentac1560f18c25e4312c1f32c001405c176daa1764 (diff)
downloadguix-d0c45d2d822fdf31b8a8edc73fe7be12a0676705.tar
guix-d0c45d2d822fdf31b8a8edc73fe7be12a0676705.tar.gz
Merge branch 'master' into core-updates
Conflicts: gnu/packages/image.scm (incorporated libtiff graft)
Diffstat (limited to 'nix/libstore/build.cc')
-rw-r--r--nix/libstore/build.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc
index 9b7bb5391c..a93095dd1e 100644
--- a/nix/libstore/build.cc
+++ b/nix/libstore/build.cc
@@ -2449,8 +2449,11 @@ void DerivationGoal::registerOutputs()
Hash h2 = recursive ? hashPath(ht, actualPath).first : hashFile(ht, actualPath);
if (h != h2)
throw BuildError(
- format("output path `%1%' should have %2% hash `%3%', instead has `%4%'")
- % path % i->second.hashAlgo % printHash16or32(h) % printHash16or32(h2));
+ format("%1% hash mismatch for output path `%2%'\n"
+ " expected: %3%\n"
+ " actual: %4%")
+ % i->second.hashAlgo % path
+ % printHash16or32(h) % printHash16or32(h2));
}
/* Get rid of all weird permissions. This also checks that
@@ -3096,7 +3099,9 @@ void SubstitutionGoal::finished()
Hash expectedHash = parseHash16or32(hashType, string(expectedHashStr, n + 1));
Hash actualHash = hashType == htSHA256 ? hash.first : hashPath(hashType, destPath).first;
if (expectedHash != actualHash)
- throw SubstError(format("hash mismatch in downloaded path `%1%': expected %2%, got %3%")
+ throw SubstError(format("hash mismatch in downloaded path `%1%'\n"
+ " expected: %2%\n"
+ " actual: %3%")
% storePath % printHash(expectedHash) % printHash(actualHash));
}