From: ludo@gnu.org (Ludovic Courtès)
To: Hartmut Goebel <hartmut@goebel-consult.de>
Cc: help-guix@gnu.org
Subject: Re: downloading a tarball
Date: Fri, 24 Mar 2017 23:10:38 +0100 [thread overview]
Message-ID: <87h92ixr4x.fsf@gnu.org> (raw)
In-Reply-To: <58D52E2A.3040203@goebel-consult.de> (Hartmut Goebel's message of "Fri, 24 Mar 2017 15:33:14 +0100")
[-- Attachment #1: Type: text/plain, Size: 2127 bytes --]
Hartmut Goebel <hartmut@goebel-consult.de> skribis:
> Am 24.03.2017 um 14:14 schrieb Tobias Geerinckx-Rice:
>>> > HTH - speaking from experience making the same mistake here..
>> I suspect most people have. The message isn't as clear as it could be.
>
> Either way round the message is hard to read: squezzed between many
> other message, no line-break and arguable wording. IMHO this should be
> improved to empower more people.
Yeah I agree.
What about this (patch below)?
--8<---------------cut here---------------start------------->8---
@ build-started /gnu/store/0rn80kgcbc90hfl2vl54adci7675fwb7-idutils-4.6.tar.xz.drv - x86_64-linux /var/log/guix/drvs/0r//n80kgcbc90hfl2vl54adci7675fwb7-idutils-4.6.tar.xz.drv.bz2
Starting download of /gnu/store/si0rm701sqmi3w69k2b2yzar4p99j66k-idutils-4.6.tar.xz
From http://ftpmirror.gnu.org/idutils/idutils-4.6.tar.xz...
following redirection to `http://mirror.ibcp.fr/pub/gnu/idutils/idutils-4.6.tar.xz'...
idutils-4.6.tar.xz 978KiB 743KiB/s 00:01 [####################] 100.0%
sha256 hash mismatch for output path `/gnu/store/si0rm701sqmi3w69k2b2yzar4p99j66k-idutils-4.6.tar.xz'
expected: 1hmai3422iaqnp34kkzxdnywl7n7pvlxp11vrw66ybxn9wxg90c2
actual: 1hmai3422iaqnp34kkzxdnywl7n7pvlxp11vrw66ybxn9wxg90c1
@ build-failed /gnu/store/0rn80kgcbc90hfl2vl54adci7675fwb7-idutils-4.6.tar.xz.drv - 1 sha256 hash mismatch for output path `/gnu/store/si0rm701sqmi3w69k2b2yzar4p99j66k-idutils-4.6.tar.xz'
expected: 1hmai3422iaqnp34kkzxdnywl7n7pvlxp11vrw66ybxn9wxg90c2
actual: 1hmai3422iaqnp34kkzxdnywl7n7pvlxp11vrw66ybxn9wxg90c1
cannot build derivation `/gnu/store/kk172bqfx6ya7w62xm1vmr2c9iyq6cpy-idutils-4.6.tar.xz.drv': 1 dependencies couldn't be built
guix build: error: build failed: build of `/gnu/store/kk172bqfx6ya7w62xm1vmr2c9iyq6cpy-idutils-4.6.tar.xz.drv' failed
--8<---------------cut here---------------end--------------->8---
(Here ‘guix build’ repeats the error message because of
#:print-build-trace, which is #true in ‘guix build’.)
Probably not optimal but hopefully an improvement.
Thanks,
Ludo’.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1498 bytes --]
diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc
index 9b7bb5391..a93095dd1 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));
}
next prev parent reply other threads:[~2017-03-24 22:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-24 12:06 downloading a tarball Catonano
2017-03-24 12:26 ` Ben Woodcroft
2017-03-24 13:14 ` Tobias Geerinckx-Rice
2017-03-24 14:33 ` Hartmut Goebel
2017-03-24 22:10 ` Ludovic Courtès [this message]
2017-03-25 16:43 ` Hartmut Goebel
2017-03-25 8:47 ` Catonano
2017-03-25 10:30 ` Ben Woodcroft
2017-03-24 12:50 ` Ricardo Wurmus
2017-03-24 13:16 ` Catonano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h92ixr4x.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=hartmut@goebel-consult.de \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).