From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: package.scm: (profile-derivation (%store) '()) Date: Fri, 20 Sep 2013 22:21:15 +0200 Message-ID: <877gebdz2c.fsf@gnu.org> References: <87r4cjjsu2.fsf@karetnikov.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]:38183) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VN7HV-00075O-AN for guix-devel@gnu.org; Fri, 20 Sep 2013 16:26:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VN7HO-0001nc-V5 for guix-devel@gnu.org; Fri, 20 Sep 2013 16:26:25 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:45442) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VN7HO-0001nJ-OW for guix-devel@gnu.org; Fri, 20 Sep 2013 16:26:18 -0400 In-Reply-To: <87r4cjjsu2.fsf@karetnikov.org> (Nikita Karetnikov's message of "Fri, 20 Sep 2013 21:39:17 +0400") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Nikita Karetnikov Cc: guix-devel@gnu.org Nikita Karetnikov skribis: > I=E2=80=99d like to know how =E2=80=98roll-back=E2=80=99 creates an empty= generation because > it=E2=80=99s necessary to do the same for =E2=80=98--delete-generations= =E2=80=99. > > However, I fail to understand how (profile-derivation (%store) =E2=80=98(= )) > works (or any other function that uses (%store)). I assume that some > code should set =E2=80=98%store=E2=80=99 to something else. Like so: > > scheme@(guix scripts package)> %store > $1 =3D #< 934e7f8 proc: #> > scheme@(guix scripts package)> (%store) > $2 =3D #f > scheme@(guix scripts package)> (%store "FOO") > $3 =3D #f > scheme@(guix scripts package)> (%store) > $4 =3D "FOO" > > But I don=E2=80=99t see anything similar in =E2=80=98package.scm=E2=80=99. =E2=80=98%store=E2=80=99 is a SRFI-39 parameter (info "(guile) Parameters")= , aka. a dynamically-scoped variable. It is initialized with the =E2=80=98parameterize=E2=80=99 form, which sets = its value for the dynamic extent of its body. HTH, Ludo=E2=80=99.