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: Wed, 25 Sep 2013 21:24:09 +0200 Message-ID: <87vc1oiu1y.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> <87eh8ebdba.fsf@gnu.org> <871u4d97ku.fsf@karetnikov.org> <87vc1pnjzz.fsf@gnu.org> <87siws22sw.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]:42059) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOum2-0000cp-8g for guix-devel@gnu.org; Wed, 25 Sep 2013 15:29:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VOuls-0000gU-Ff for guix-devel@gnu.org; Wed, 25 Sep 2013 15:29:22 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:60699) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOuls-0000gM-AL for guix-devel@gnu.org; Wed, 25 Sep 2013 15:29:12 -0400 In-Reply-To: <87siws22sw.fsf@karetnikov.org> (Nikita Karetnikov's message of "Wed, 25 Sep 2013 22:07:11 +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: >>> What about these patches? Should the first patch also test the >>> following case? >>> >>> + (let ((numbers (generation-numbers profile))) >>> + (if (equal? numbers '(0)) >>> + (exit 1) >>> + (for-each list-generation numbers)))) > >> The first patch below already contains that snippet, so I=E2=80=99m not = sure >> what you mean. > > There are two cases: > > 1. A generation does not exist. > > 2. The profile points to the zeroth generation, and there are no other > generations. > > =E2=80=98tests/guix-package.sh=E2=80=99 tests the first case. Should we = test the second > case too? What would be the best way to do so? The second case is valid. Thus it=E2=80=99s OK for --list-generations to n= ot print anything, but it must exit with 0. Likewise, --delete-generations should do nothing and exit with 0 with the only generation that would be deleted is Generation 0. Does it make sense? Ludo=E2=80=99.