From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] guix package: Add '--delete-generations'. Date: Mon, 23 Sep 2013 17:41:57 +0200 Message-ID: <87eh8ftuii.fsf@gnu.org> References: <87vc2o4qwc.fsf@gnu.org> <87y57kljro.fsf@karetnikov.org> <87hae81uvo.fsf@gnu.org> <87li2oslzh.fsf_-_@karetnikov.org> <878uyo60gp.fsf@gnu.org> <877ge7onje.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]:33333) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VO8Lq-0000he-BF for guix-devel@gnu.org; Mon, 23 Sep 2013 11:47:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VO8Lk-0004Gc-I1 for guix-devel@gnu.org; Mon, 23 Sep 2013 11:47:06 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:54942) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VO8Lk-0004GW-BZ for guix-devel@gnu.org; Mon, 23 Sep 2013 11:47:00 -0400 In-Reply-To: <877ge7onje.fsf@karetnikov.org> (Nikita Karetnikov's message of "Mon, 23 Sep 2013 14:11:33 +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: >> =E2=80=9CDelete the generations matching @var{patterns} or ... when omit= ted.=E2=80=9D > >> Or what actually? I would expect it to delete all the generations but >> the current one when PATTERN is omitted, right? > > =E2=80=98--delete-generations=E2=80=99 deletes everything and points the = profile to the > zeroth generation. There are range patterns if you want to keep the > current generation. I prefer the current behavior. Oh. I=E2=80=99d prefer if it would delete all generations but the current = one. That=E2=80=99s a fairly useful pattern: suppose you want to make space on y= our disk (and you know you won=E2=80=99t need to roll back), it=E2=80=99d be ha= ndy to run: guix package --delete-generations && guix gc Whereas if you have to use ranges, you end up doing something like: guix package --list-generations |grep ^G # check the number of the last generation... guix package --delete-generations=3D..42 && guix gc Conversely, removing *all* the generations is something you=E2=80=99re unli= kely to do very often. WDYT? >> No need for =E2=80=98begin=E2=80=99 in the body of a =E2=80=98cond=E2=80= =99 clause. > > Why? Is it specified somewhere? Or is it easier to read? It=E2=80=99s easier to read if there=E2=80=99s no extra =E2=80=98begin=E2= =80=99 IMO, and it=E2=80=99s specified in R5RS & co. (info "(r5rs) Expression"). >> Why is there this big hunk? If it=E2=80=99s just reindenting, could you= arrange >> to remove this hunk? > > I couldn=E2=80=99t avoid reindenting since the word =E2=80=9Ccond=E2=80= =9D is longer than =E2=80=9Cif.=E2=80=9D > However, I used this opportunity to move a couple of things around. I=E2= =80=99d > prefer to keep this change. OK fine. I just wanted to make sure this was only reindenting. > Frankly, I think that the module should be reorganized at some point > (especially the =E2=80=98guix-package=E2=80=99 function). I don=E2=80=99= t like that functions > don=E2=80=99t fit on the screen. Agreed (though individual functions do fit on the screen; the top-level function is pretty much a module ;-)). The profile-related functions will go in a (guix profile) module as soon as you=E2=80=99re done with --delete-generations. Thanks, Ludo=E2=80=99.