From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: New =?utf-8?Q?=E2=80=98--list-generations=E2=80=99?= and =?utf-8?Q?=E2=80=98--delete-generations=E2=80=99?= options Date: Fri, 13 Sep 2013 23:29:20 +0200 Message-ID: <8738p8wgun.fsf@gnu.org> References: <87vc2o4qwc.fsf@gnu.org> <878uzj6nev.fsf@gnu.org> <877gf1yftq.fsf@karetnikov.org> <87bo4dspl2.fsf@gnu.org> <87a9jxeh05.fsf@gnu.org> <87r4d9r2lv.fsf@gnu.org> <874na4jfp4.fsf_-_@karetnikov.org> <87eh97616m.fsf@gnu.org> <87bo48xdgb.fsf@karetnikov.org> <87hadz9gze.fsf@gnu.org> <87fvtjdl7y.fsf@karetnikov.org> <87bo444e9q.fsf@gnu.org> <87fvtfzihg.fsf@karetnikov.org> <87ioybxdun.fsf@gnu.org> <877geq9wx6.fsf@karetnikov.org> <87zjrmgcjh.fsf@gnu.org> <87ob80os3c.fsf@karetnikov.org> <87li336ofs.fsf@gnu.org> <87wqmmxutb.fsf@karetnikov.org> <87zjrins47.fsf@gnu.org> <87zjrgok6l.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]:45998) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKb0a-0000Qi-18 for guix-devel@gnu.org; Fri, 13 Sep 2013 17:34:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VKb0S-0007mn-38 for guix-devel@gnu.org; Fri, 13 Sep 2013 17:34:31 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:56028) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKb0R-0007mb-SY for guix-devel@gnu.org; Fri, 13 Sep 2013 17:34:24 -0400 In-Reply-To: <87zjrgok6l.fsf@karetnikov.org> (Nikita Karetnikov's message of "Fri, 13 Sep 2013 18:44:34 +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 prefer clearer case analysis as shown above. > > OK, what do you think about this diff? If everything is fine, I=E2=80=99= ll make > it output generations in the recutils format. Cool. The diff looks great... but it lacks tests. What you could do is add the test cases you already have to tests/profile.scm, say (or tests/ui.scm for =E2=80=98string->duration=E2=80= =99, and then put that one in (guix ui)?), along with a simple test in tests/guix-package.sh. WDYT? > (Is it necessary to mention that =E2=80=98maybe-comma-separated-integers= =E2=80=99 accepts > something like =E2=80=981,2,3,=E2=80=99 or =E2=80=981,,,2=E2=80=99. Or s= hould I change the function?) That=E2=80=99s OK. > I don=E2=80=99t know if the code works with non-default profiles because = my > store is broken. When I try to install or build a new package (with or > without substitutes), I get the following message: > > guix package: error: build failed: getting attributes of path `/nix/store= /fcwh19ljibqjfx0c3cwnwcc7p31aq227-glibc-2.17-locales': No such file or dire= ctory Arf, what have you dooooone? Maybe you can try =E2=80=98nix-store --verify=E2=80=99 (and port that optio= n to Guix while you=E2=80=99re at it ;-)). Minor things: > +(define (string->generations str) > + "Return a list of generations matching a pattern in STR. This function Return *the* list of... > +(define* (available-generations str #:optional (profile %current-profile= )) Perhaps =E2=80=98matching-generations=E2=80=99? Thank you! Ludo=E2=80=99.