guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New ‘--list-generations’ and ‘--delete-generations’ options


From: Ludovic Courtès
Subject: Re: New ‘--list-generations’ and ‘--delete-generations’ options
Date: Fri, 13 Sep 2013 23:29:20 +0200
User-agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux)

Nikita Karetnikov <address@hidden> skribis:

>> I’d prefer clearer case analysis as shown above.
>
> OK, what do you think about this diff?  If everything is fine, I’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 ‘string->duration’, 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 ‘maybe-comma-separated-integers’ accepts
> something like ‘1,2,3,’ or ‘1,,,2’.  Or should I change the function?)

That’s OK.

> I don’t 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 directory

Arf, what have you dooooone?

Maybe you can try ‘nix-store --verify’ (and port that option to Guix
while you’re 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 ‘matching-generations’?

Thank you!

Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]