From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:52493) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iiQ5z-0004kD-Os for guix-patches@gnu.org; Fri, 20 Dec 2019 16:46:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iiQ5y-0001Nx-Rg for guix-patches@gnu.org; Fri, 20 Dec 2019 16:46:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:41359) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iiQ5y-0001Ml-LX for guix-patches@gnu.org; Fri, 20 Dec 2019 16:46:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iiQ5y-0000zl-GW for guix-patches@gnu.org; Fri, 20 Dec 2019 16:46:02 -0500 Subject: [bug#38612] Pass system and target arguments to gexp->file. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87a77ug6vv.fsf@gmail.com> <8736dl8wxq.fsf@gmail.com> Date: Fri, 20 Dec 2019 22:45:24 +0100 In-Reply-To: <8736dl8wxq.fsf@gmail.com> (Mathieu Othacehe's message of "Sun, 15 Dec 2019 15:50:41 +0100") Message-ID: <87d0cipt6z.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: Mathieu Othacehe Cc: 38612@debbugs.gnu.org Mathieu Othacehe skribis: > --- a/guix/profiles.scm > +++ b/guix/profiles.scm > @@ -1438,7 +1438,8 @@ MANIFEST." > (locales? #t) > (allow-collisions? #f) > (relative-symlinks? #f) > - system target) > + (system (%current-system)) > + (target (%current-target-system))) > "Return a derivation that builds a profile (aka. 'user environment') w= ith > the given MANIFEST. The profile includes additional derivations returne= d by > the monadic procedures listed in HOOKS--such as an Info 'dir' file, etc. AFAICS this change is unnecessary and even incorrect: the (mlet* %store-monad ((system (if system (return system) (current-system))) trick ensures that we get the system that current at the time of the monadic bind, whereas your change get the system and target that are current at the time of the call. It=E2=80=99s a terrible pitfall, I know=E2=80=A6 Thanks, Ludo=E2=80=99.