From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: bug#33419: guix package is not showing that the checksum is mismatching Date: Sun, 18 Nov 2018 17:59:48 -0500 Message-ID: <20181118225948.GC25252@jasmine.lan> References: <20181118150433.63437ece@alma-ubu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="32u276st3Jlj2kUU" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOW2v-0004DW-NP for bug-guix@gnu.org; Sun, 18 Nov 2018 18:00:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gOW2s-0000hT-Fn for bug-guix@gnu.org; Sun, 18 Nov 2018 18:00:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:55204) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gOW2s-0000ge-BN for bug-guix@gnu.org; Sun, 18 Nov 2018 18:00:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gOW2s-0005xc-9Z for bug-guix@gnu.org; Sun, 18 Nov 2018 18:00:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: Content-Disposition: inline In-Reply-To: <20181118150433.63437ece@alma-ubu> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: =?UTF-8?Q?Bj=C3=B6rn_?= =?UTF-8?Q?H=C3=B6fling?= Cc: 33419@debbugs.gnu.org --32u276st3Jlj2kUU Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 18, 2018 at 03:04:33PM +0100, Bj=F6rn H=F6fling wrote: > I updated a package-definition and forgot to update the Checksum. When > then updating, it just fails, and the new, nice, logging-reduced UI > doesn't tell: Yes, this is a classic "gotcha" of Guix package development. In Guix, those "things" for which you provide a hash are called "fixed-output derivations": https://www.gnu.org/software/guix/manual/en/html_node/Derivations.html Unlike regular derivations, we know in advance what the output of the derivation will be. Therefore, it does not matter to us how it is built (from source, downloaded over HTTP, downloaded with Git, found in /gnu/store, etc). When building fixed-output derivations, Guix first looks in /gnu/store to see if they are already built. If so, it just uses what it finds there. So, if you give the wrong hash, as you did in your example, Guix will use that wrong source code. This failure mode is often discovered by people who used `guix download` to calculate a source hash, but then put the wrong URI in their package definition. Because the source is already in /gnu/store, the URI is not tested and their package doesn't work for anybody else. It may also happen when the source is only found on the content-addressed mirrors provided by Nix; no file-name checking is performed in that case. > $ guix package -u guix-tools > substitute: updating list of substitutes from 'https://berlin.guixsd.org'= =2E.. 0 > [..] > building /gnu/store/vy3s1y7bv1w6d8gmp5b10xppy9skbgkd-guix-tools-0.1.0-2.4= f17b79-checkout.drv... > build of /gnu/store/vy3s1y7bv1w6d8gmp5b10xppy9skbgkd-guix-tools-0.1.0-2.4= f17b79-checkout.drv failed > View build log at '/var/log/guix/drvs/vy/3s1y7bv1w6d8gmp5b10xppy9skbgkd-g= uix-tools-0.1.0-2.4f17b79-checkout.drv.bz2'. > -guix package: error: build failed: build of `/gnu/store/iwma3gq778n32mqz= 6y7277g67nvx1abb-guix-tools-0.1.0-2.4f17b79.drv' failed [...] > Only when I explicitly built it, the error was shown: >=20 > $ guix build guix-tools >=20 > HEAD is now at 4f17b79 gdev: Add more package to environment. > environment variable `PATH' unset > output path `/gnu/store/s399g9f1k19v01rs992w5dl6aif87har-guix-tools-0.1.0= -2.4f17b79-checkout' should have r:sha256 hash `1j4q43hk7jrys7zsmws37g6w7ba= bzshfdb1s5myl7qwr3mcx6hnf', instead has `0b61q29915b4i6adidx3zixnx3m0zp58rj= bfa9byqcz13szznc52' > build of /gnu/store/vy3s1y7bv1w6d8gmp5b10xppy9skbgkd-guix-tools-0.1.0-2.4= f17b79-checkout.drv failed > View build log at '/var/log/guix/drvs/vy/3s1y7bv1w6d8gmp5b10xppy9skbgkd-g= uix-tools-0.1.0-2.4f17b79-checkout.drv.bz2'. > cannot build derivation `/gnu/store/iwma3gq778n32mqz6y7277g67nvx1abb-guix= -tools-0.1.0-2.4f17b79.drv': 1 dependencies couldn't be built > guix build: error: build failed: build of `/gnu/store/iwma3gq778n32mqz6y7= 277g67nvx1abb-guix-tools-0.1.0-2.4f17b79.drv' failed >=20 > Is it intended that this build-failure detail is not shown? I suppose > not. At least in a log it should be shown. I agree that `guix package` should print the relevant error. --32u276st3Jlj2kUU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlvx7uQACgkQJkb6MLrK fwgCTg//dlaRhZwLUhvSXVC44/s+mXOYPCLGzu/0A1DwGtnnBmUHxieArRWYnu1B TcqUvb4EJ7kawzti9j/WgjWtg9H0r6HZ0Wa6qBx587Kqs8tFLK9AxuNU2MxhEIz+ L0aETT+Zs5eqgn5nW+hQx4OGdy9J4y4RI3uOCG3mPX8W6SlPcGzUGvgNIp8zUz7D fyQKj/eEDWd6Ya2Wayz2ybhkDue9xmxlfTVv2ssKcC9c3mr7ZmYCldrbzRpNfdtt Pn0PlhOils59E4j2P66wrWWf9dc+9FrVS0+zicpOWJo4sKkUFcODOLu6g31UzJbV FH0smvIEYjIYzhAIT1XGYSSouYVY5LuG19oZKmP6Ksikasqyl2XbxBt9ndxMf/Dd 7/SRSs6qjzrKC1LbxMgHB8J3lmjHJpy6mYZyfYvzfxiBkSrky7z8tQkI/xogW2I+ 0w4fJLQkyPK8s3vLuzp6ckg/77g2aS+ZZuZdB15+W17YIK1VhSpa0+uu+EDBiTUO hx92bZw2iYQ9cjxRBzh8PtX1AuhYwq6mpcAsDIhGOjNeYMcfqblUkwiaxKRa7VLE qD80mWrJ1A4BeuKUoUd0QSdBn3Y0EBP326Bxx+Enr3r2tGgKR2SQGYHC1TARKyYF JkWJUni3NUGYXEL1Vw9QSb7iqiJby7dGD37cFHKdrlVOKACc4s0= =rYnU -----END PGP SIGNATURE----- --32u276st3Jlj2kUU--