From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: =?utf-8?Q?What=E2=80=99s?= next? Date: Tue, 30 May 2017 17:55:42 +0200 Message-ID: <871sr62vb5.fsf@gnu.org> References: <877f16z9eo.fsf@gnu.org> <87y3tm8k2r.fsf@elephly.net> <87zidyvctf.fsf@gnu.org> <877f12ezzj.fsf@elephly.net> <87h904ogo5.fsf@gnu.org> <87fufoiryv.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52510) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFjUr-0006C4-3A for guix-devel@gnu.org; Tue, 30 May 2017 11:55:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFjUn-0004FO-8o for guix-devel@gnu.org; Tue, 30 May 2017 11:55:49 -0400 In-Reply-To: <87fufoiryv.fsf@elephly.net> (Ricardo Wurmus's message of "Sun, 28 May 2017 23:36:40 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ricardo Wurmus Cc: guix-devel Ricardo Wurmus skribis: > Ludovic Court=C3=A8s writes: [...] >> Oops. Here we go: >> >> modified nix/libstore/build.cc >> @@ -2449,8 +2449,11 @@ void DerivationGoal::registerOutputs() >> Hash h2 =3D recursive ? hashPath(ht, actualPath).first : ha= shFile(ht, actualPath); >> if (h !=3D 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 =3D parseHash16or32(hashType, string(expe= ctedHashStr, n + 1)); >> Hash actualHash =3D hashType =3D=3D htSHA256 ? hash.first := hashPath(hashType, destPath).first; >> if (expectedHash !=3D actualHash) >> - throw SubstError(format("hash mismatch in downloaded pa= th `%1%': expected %2%, got %3%") >> + throw SubstError(format("hash mismatch in downloaded pa= th `%1%'\n" >> + " expected: %2%\n" >> + " actual: %3%") >> % storePath % printHash(expectedHash) % printHash(a= ctualHash)); >> } >> >> Should we apply it? > > Yes, please. This looks much better! Thank you! Applied! Ludo=E2=80=99.