From mboxrd@z Thu Jan 1 00:00:00 1970 From: Diego Nicola Barbato Subject: bug#31085: Unexpected behaviour when running `guix build lilypond' Date: Fri, 20 Apr 2018 23:20:01 +0200 Message-ID: <87tvs5tw1q.fsf@GlaDOS.home> References: <873708jdao.fsf@GlaDOS.home> <87muxzi4v4.fsf@gnu.org> 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]:37225) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f9dSr-0003rz-Is for bug-guix@gnu.org; Fri, 20 Apr 2018 17:21:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f9dSo-0001Bv-9I for bug-guix@gnu.org; Fri, 20 Apr 2018 17:21:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:54720) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f9dSo-0001Af-4T for bug-guix@gnu.org; Fri, 20 Apr 2018 17:21:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f9dSn-0005cd-UC for bug-guix@gnu.org; Fri, 20 Apr 2018 17:21:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87muxzi4v4.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Thu, 19 Apr 2018 17:38:07 +0200") 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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 31085@debbugs.gnu.org Hello ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Hello, > > Diego Nicola Barbato skribis: > >> I have experienced some unexpected behaviour when running `guix build >> lilypond': >> After verifying that there was a substitute available with `guix weather >> -m m.scm' (Where m.scm evaluates to a manifest containing only lilypond) >> I ran `guix build lilypond --dry-run' which claimed that a substitute >> would be downloaded. I then ran `guix build lilypond' which proceeded >> to build lilypond from source (instead of downloading the substitute). >> >> Upon explaining this on IRC it was suggested that I try running `guix >> build --no-grafts lilypond' (which actually downloaded the substitute) >> then deleting the locally built lilypond with `guix gc --delete >> /gnu/store/...' and finally running `guix build lilypond' again (which, >> this time, grafted the substituted lilypond instead of building it from >> source again). While this fixed the issue I was told that this >> behaviour was indeed unexpected. > > We=E2=80=99d have to see if this is still reproducible, but I have a plau= sible > explanation. I can consistently reproduce this in a VM with the following steps: First I run: $ qemu-system-x86_64 -enable-kvm -snapshot -m 4G $(guix system vm-image ba= re-bones.scm --image-size=3D8G) (Where bare-bones.scm is the bare-bones.tmpl after replacing /dev/sdX with /dev/sda.) Then after logging in as root: # guix pull --commit=3D872bda5de52a8f0514230ebc4e9680aab74f509a # guix build --dry-run lilypond Which returns: 52.1 MB would be downloaded: /gnu/store/0amx7bcbs518lkqwfh2azmqrp2yqib0g-lilypond-2.19.80 /gnu/store/7b5ykfl6jbrdl8j7xp630fga4as3234z-ghostscript-9.22 /gnu/store/j4vj7h3wyb532g2j0axzjj43z2a0dg81-python-2.7.14 /gnu/store/k2ak44m0miind785x22mmpbcwi0mq7hq-freetype-2.8.1 /gnu/store/mkhfqx7m7pniyic0kh0lnafmajymn4dr-guile-1.8.8 /gnu/store/pwbx5fhjrq9crr1c0d2x08ch0l6vr3cv-pango-1.40.14 /gnu/store/qm8ri32n0rkh749v3jb3x8s8ksjl7yd3-fontconfig-2.12.6 /gnu/store/sm37m59gq3smxxz8gs4jikn50qg0g7xh-glib-2.54.2 Then: # guix build lilypond Which, after downloading the dependencies, starts to build lilypond from source. > Substitute info is cached locally. guix-daemon caches it under > /var/guix/substitute/cache, but =E2=80=98guix weather=E2=80=99 caches it = under > ~/.cache/guix/substitute (that=E2=80=99s because it needs fine-grain cont= rol > over substitute info and thus cannot simply use the > =E2=80=98substitutable-path-info=E2=80=99 daemon RPC.) Each cached entry= has a > time-to-live (TTL). > > What could have happened is that /var/guix/substitute/ had a > not-expired-yet entry saying that there=E2=80=99s no substitute for LilyP= ond > (which is why =E2=80=98guix build=E2=80=99 ended up building from source)= , whereas =E2=80=98guix > weather=E2=80=99 was run at a point when there was a substitute. The unexpected behaviour was that `guix build lilypond' started to build lilypond from source after `guix build --dry-run lilypond' had claimed that nothing would be built and that it would download a substitute. I assume that `guix build --dry-run' is not affected by the substitute info used by `guix weather'. I only ran `guix weather' in order to double check that there were indeed substitutes available (Sorry for the red herring). Greetings Diego