From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Generation 0 Date: Tue, 24 Sep 2013 14:43:05 +0200 Message-ID: <87eh8ebdba.fsf@gnu.org> References: <87vc2o4qwc.fsf@gnu.org> <87y57kljro.fsf@karetnikov.org> <87hae81uvo.fsf@gnu.org> <87li2oslzh.fsf_-_@karetnikov.org> <87hadcr4sh.fsf_-_@karetnikov.org> <8738ow5zif.fsf@gnu.org> <87vc1r6nu0.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]:40521) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOS2I-0000YV-1z for guix-devel@gnu.org; Tue, 24 Sep 2013 08:48:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VOS2C-0005kp-Kz for guix-devel@gnu.org; Tue, 24 Sep 2013 08:48:13 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:57017) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOS2C-0005ki-EM for guix-devel@gnu.org; Tue, 24 Sep 2013 08:48:08 -0400 In-Reply-To: <87vc1r6nu0.fsf@karetnikov.org> (Nikita Karetnikov's message of "Tue, 24 Sep 2013 04:54:47 +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: >>> I think we should change =E2=80=98--list-generations=E2=80=99 to not ou= tput the zeroth >>> generation. Even though it could be present in the profile, users >>> shouldn=E2=80=99t be concerned about it. > >> Agreed. > > Can I push these patches to =E2=80=98master=E2=80=99? Should I document = that the zeroth > generation is always ignored? Why not. There=E2=80=99s already a mention of =E2=80=9Cprofile zero=E2=80= =9D (which should be changed to =E2=80=9Cgeneration zero=E2=80=9D) under =E2=80=98--roll-back=E2= =80=99 in the manual. > From 7fc042876bf00031d6b36b8d697984ce1ee1700e Mon Sep 17 00:00:00 2001 > From: Nikita Karetnikov > Date: Mon, 23 Sep 2013 22:56:21 +0000 > Subject: [PATCH 1/3] tests: Test that '--list-generations' may not output > anything. Make sure to add a commit log. > --- > tests/guix-package.sh | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/tests/guix-package.sh b/tests/guix-package.sh > index b09a9c0..e2c0374 100644 > --- a/tests/guix-package.sh > +++ b/tests/guix-package.sh > @@ -85,6 +85,9 @@ then > test "`guix package -p "$profile" -l | cut -f1 | grep guile | head -= n1`" \ > =3D " guile-bootstrap" >=20=20 > + # Do not output anything when a generation does not exist. > + test -z "`guix package -p "$profile" -l 42`" I=E2=80=99d rather test the exit code instead of/in addition to the output. Does it exit with 1? I think it should. > + (or (zero? number) > + (begin > + (format #t (_ "Generation ~a\t~a~%") number OK, but rather use (unless (zero? number) (format #t ...) ...) > From 64b01b6414d42b9b495059223e5312d9d01ba860 Mon Sep 17 00:00:00 2001 > From: Nikita Karetnikov > Date: Tue, 24 Sep 2013 00:36:51 +0000 > Subject: [PATCH 3/3] tests: Use 'test -z' to check that a string equals z= ero. > > --- > tests/guix-package.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) OK. Thanks, Ludo=E2=80=99.