[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] guix package: Add '--delete-generations'.
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH] guix package: Add '--delete-generations'. |
Date: |
Mon, 23 Sep 2013 17:41:57 +0200 |
User-agent: |
Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux) |
Nikita Karetnikov <address@hidden> skribis:
>> “Delete the generations matching @var{patterns} or ... when omitted.”
>
>> Or what actually? I would expect it to delete all the generations but
>> the current one when PATTERN is omitted, right?
>
> ‘--delete-generations’ deletes everything and points the profile to the
> zeroth generation. There are range patterns if you want to keep the
> current generation. I prefer the current behavior.
Oh. I’d prefer if it would delete all generations but the current one.
That’s a fairly useful pattern: suppose you want to make space on your
disk (and you know you won’t need to roll back), it’d 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=..42 && guix gc
Conversely, removing *all* the generations is something you’re unlikely
to do very often.
WDYT?
>> No need for ‘begin’ in the body of a ‘cond’ clause.
>
> Why? Is it specified somewhere? Or is it easier to read?
It’s easier to read if there’s no extra ‘begin’ IMO, and it’s specified
in R5RS & co. (info "(r5rs) Expression").
>> Why is there this big hunk? If it’s just reindenting, could you arrange
>> to remove this hunk?
>
> I couldn’t avoid reindenting since the word “cond” is longer than “if.”
> However, I used this opportunity to move a couple of things around. I’d
> prefer to keep this change.
OK fine. I just wanted to make sure this was only reindenting.
> Frankly, I think that the module should be reorganized at some point
> (especially the ‘guix-package’ function). I don’t like that functions
> don’t fit on the screen.
Agreed (though individual functions do fit on the screen; the top-level
function is pretty much a module ;-)).
The profile-related functions will go in a (guix profile) module as soon
as you’re done with --delete-generations.
Thanks,
Ludo’.
- Re: [PATCH] guix package: Show which generation is the current one., (continued)
- Re: [PATCH] guix package: Show which generation is the current one., Ludovic Courtès, 2013/09/25
- Re: Generation 0, Ludovic Courtès, 2013/09/24
- Re: Generation 0, Nikita Karetnikov, 2013/09/24
- Re: Generation 0, Ludovic Courtès, 2013/09/25
- Re: Generation 0, Nikita Karetnikov, 2013/09/25
- Re: Generation 0, Ludovic Courtès, 2013/09/25
- Re: Generation 0, Nikita Karetnikov, 2013/09/25
- Re: Generation 0, Ludovic Courtès, 2013/09/26
Re: [PATCH] guix package: Add '--delete-generations'., Ludovic Courtès, 2013/09/22
Re: [PATCH] guix package: Add '--delete-generations'., Nikita Karetnikov, 2013/09/25
Re: [PATCH] guix package: Add '--delete-generations'., Ludovic Courtès, 2013/09/25
Re: [PATCH] guix package: Add '--delete-generations'., Nikita Karetnikov, 2013/09/25
Re: [PATCH] guix package: Add '--delete-generations'., Ludovic Courtès, 2013/09/26
Re: [PATCH] guix package: Add '--delete-generations'., Ludovic Courtès, 2013/09/27