From mboxrd@z Thu Jan 1 00:00:00 1970 From: swedebugia Subject: bug#33647: First `guix pull' behaves unexpectedly Date: Wed, 19 Dec 2018 18:37:24 +0100 Message-ID: References: <874lbqu2j3.fsf@GlaDOS.home> <87k1km3bn0.fsf@elephly.net> <871s6ugsrq.fsf@gnu.org> <87sgz9spgw.fsf@GlaDOS.home> <87r2eth3by.fsf@gnu.org> <87y38lu1f6.fsf@GlaDOS.home> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47265) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZfhe-0006g5-OQ for bug-guix@gnu.org; Wed, 19 Dec 2018 12:32:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZfhX-0003ef-1X for bug-guix@gnu.org; Wed, 19 Dec 2018 12:32:12 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:50790) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gZfhU-0003dA-3r for bug-guix@gnu.org; Wed, 19 Dec 2018 12:32:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gZfhR-0006W5-Uy for bug-guix@gnu.org; Wed, 19 Dec 2018 12:32:04 -0500 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZfgR-0005wm-WC for bug-guix@gnu.org; Wed, 19 Dec 2018 12:31:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZfgO-0001rL-Ks for bug-guix@gnu.org; Wed, 19 Dec 2018 12:30:59 -0500 Received: from mx1.riseup.net ([198.252.153.129]:34130) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gZfgO-0001pV-AP for bug-guix@gnu.org; Wed, 19 Dec 2018 12:30:56 -0500 Received: from piha.riseup.net (piha-pn.riseup.net [10.0.1.163]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.riseup.net (Postfix) with ESMTPS id 1F1EC1A3AD1 for ; Wed, 19 Dec 2018 09:30:55 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by piha.riseup.net with ESMTPSA id DD96B6BE25 for ; Wed, 19 Dec 2018 09:30:53 -0800 (PST) In-Reply-To: <87y38lu1f6.fsf@GlaDOS.home> Content-Language: en-US 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: 33647@debbugs.gnu.org On 2018-12-19 13:49, Diego Nicola Barbato wrote: > Hello, >=20 > Ludovic Court=C3=A8s writes: >=20 >> Diego Nicola Barbato skribis: >> >>> Ludovic Court=C3=A8s writes: >> >> [...] >> >>>> In addition, be aware that Bash maintains a cache of commands it loo= ked >>>> up in $PATH. Thus it may be that, say, it had cached that =E2=80=98= guix=E2=80=99 is >>>> really /run/current-system/profile/bin/guix. When you pulled, it di= dn=E2=80=99t >>>> invalidate its cache thus you kept using that old version. >>>> >>>> The solution is to run =E2=80=9Chash guix=E2=80=9D at the Bash promp= t to force cache >>>> invalidation (info "(bash) Bourne Shell Builtins"). >>> >>> I believe this is it. This also explains why =E2=80=98which guix=E2=80= =99 returned the >>> updated guix while =E2=80=98guix --version=E2=80=99 claimed it was st= ill the older >>> version, which I found rather confusing. >>> I am afraid being unaware of this has led me to inadvertently downgra= de >>> GuixSD whenever I reconfigured for the first time after a fresh insta= ll. >> >> Yeah. This is not strictly speaking a Guix bug, but clearly it=E2=80=99= s a >> common pitfall. Perhaps we should print a hint upon completion? >=20 > While I think it would be nice for Guix (or strictly speaking Bash) to > just do what a noob like me would expect it to do in this situation, a > hint would have certainly saved me some trouble. If it is unreasonably > cumbersome to make Guix tell Bash to invalidate its cache upon > completion of =E2=80=98guix pull=E2=80=99, I believe a hint would be go= od enough. I wholeheartedly agree with Diego. Either we fix it (preferably, even if we have to patch bash in order to=20 archive what we want) or we tell the users what to do (this is bad=20 because we already tell the users a lot of env variables and this just=20 adds clutter and one more cumbersome thing to remember). FWW I just ran "hash pacman" on parabola and the result was this: egil@parabola:~$ time hash pacman real 0m0,000s user 0m0,000s sys 0m0,000s So it won't and any measuable overhead to just call this in the end of=20 guix package after updating the symlinks to the new profile generation. --=20 Cheers Swedebugia