From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:60738) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hoqYp-0007gI-75 for guix-patches@gnu.org; Sat, 20 Jul 2019 10:42:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hoqYm-0003H8-Ap for guix-patches@gnu.org; Sat, 20 Jul 2019 10:42:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48925) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hoqYk-0003GU-SG for guix-patches@gnu.org; Sat, 20 Jul 2019 10:42:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hoqYk-0005FZ-P4 for guix-patches@gnu.org; Sat, 20 Jul 2019 10:42:02 -0400 Subject: [bug#36555] [PATCH v4 2/3] guix system: Reimplement 'reconfigure'. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87imsci9sj.fsf@sdf.lonestar.org> <87ef30i9fl.fsf@sdf.lonestar.org> <87y3129qsn.fsf@gnu.org> <87sgr9bziq.fsf@sdf.lonestar.org> <87pnmc7nt1.fsf@gnu.org> <8736j7nwcb.fsf@sdf.lonestar.org> <87muhfjm14.fsf@gnu.org> <87ftn63l7d.fsf@sdf.lonestar.org> <87v9w1zgon.fsf_-_@sdf.lonestar.org> <87y30v3qke.fsf@sdf.lonestar.org> <871rylrjt8.fsf_-_@sdf.lonestar.org> <87wogdq575.fsf_-_@sdf.lonestar.org> <87r26lq531.fsf_-_@sdf.lonestar.org> Date: Sat, 20 Jul 2019 16:40:54 +0200 In-Reply-To: <87r26lq531.fsf_-_@sdf.lonestar.org> (Jakob L. Kreuze's message of "Fri, 19 Jul 2019 13:58:26 -0400") Message-ID: <87a7d86a6h.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: "Jakob L. Kreuze" Cc: 36555@debbugs.gnu.org Hello, zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) skribis: > * guix/scripts/system.scm (switch-to-system) > (upgrade-shepherd-services, install-bootloader): Delete variable. > * guix/scripts/system.scm (local-eval): New variable. ^ No need to repeat the file name here. However there are other changes no mentioned here, for example changes to the =E2=80=98install=E2=80=99 procedure. Could you add them to the log? > + (install-bootloader local-eval bootloader bootcfg > + #:target target) > + (return > + (format #t "bootloader successfully installed on '~a'~%" > + (bootloader-configuration-target bootloader)))))))) While you=E2=80=99re at it, could you change it to: (info (G_ "bootloader successfully installed on '~a'~%") =E2=80=A6) ? What happens when =E2=80=98install-bootloader=E2=80=99 fails though? We sh= ould make sure that the error is diagnosed, and that the output of =E2=80=98grub-inst= all=E2=80=99 or similar is shown when that happens. > +(define (local-eval exp) > + "Evaluate EXP, a G-Expression, in-place." Eventually we should add it to (guix gexp). > + (mlet* %store-monad ((lowered (lower-gexp exp)) > + (_ (built-derivations (map gexp-input-thing > + (lowered-gexp-inputs l= owered))))) Note that there are now a few places where we call =E2=80=98built-derivatio= ns=E2=80=99 without calling =E2=80=98show-what-to-build*=E2=80=99 first. That means th= e UX might be pretty bad since one has no idea what=E2=80=99s being built. Furthermore, that means substitutes may not be up-to-date, leading to many =E2=80=9Cupdating substitutes=E2=80=9D messages and HTTP round trips (= as happened with ). Last, doing several =E2=80=98build-derivations=E2=80=99 call with just a co= uple of derivations is less efficient than doing a single call with many derivations; that also has an impact on the UI, if we were to call =E2=80=98show-what-to-build*=E2=80=99 once for =E2=80=98build-derivations= =E2=80=99 call. What=E2=80=99s your experience with this in practice? There are several things we can do to improve on that. One is to have =E2=80=98built-derivations=E2=80=99 automatically call =E2=80=98show-what-t= o-build*=E2=80=99. However, (guix derivations) must not depend on (guix ui) so we could add a parameter to =E2=80=98run-with-store=E2=80=99 that would specify what to do= upon =E2=80=98build-derivations=E2=80=99. Last but not least, make sure to test this on your machine. :-) It=E2=80=99s sensitive code that we=E2=80=99d rather not break. Thanks! Ludo=E2=80=99.