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: Wed, 25 Sep 2013 15:05:19 +0200 Message-ID: <87fvstm4q8.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> <87eh8ftuii.fsf@gnu.org> <87eh8dzg39.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]:55093) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOorM-0004Wu-4I for guix-devel@gnu.org; Wed, 25 Sep 2013 09:10:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VOorF-0004pH-Qx for guix-devel@gnu.org; Wed, 25 Sep 2013 09:10:28 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:59815) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOorF-0004pB-F3 for guix-devel@gnu.org; Wed, 25 Sep 2013 09:10:21 -0400 In-Reply-To: <87eh8dzg39.fsf@karetnikov.org> (Nikita Karetnikov's message of "Wed, 25 Sep 2013 08:21:30 +0400") List-Id: "Development of GNU Guix and the GNU System distribution." 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: >> Oh. I=E2=80=99d prefer if it would delete all generations but the curre= nt one. > >> That=E2=80=99s a fairly useful pattern: suppose you want to make space o= n your >> disk (and you know you won=E2=80=99t need to roll back), it=E2=80=99d be= handy 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 u= nlikely >> to do very often. > > =E2=80=98--delete-generations=E2=80=99 could accept an additional argumen= t, say, > =E2=80=98keep-current=E2=80=99. It=E2=80=99d be easier to implement, and= I find it less > confusing. > > Would you accept such a solution? Frankly, I don=E2=80=99t like it. I think the default behavior should not = be to let the user shoot themself in the foot. WDYT? Ludo=E2=80=99.