Subject: Re: [bug#37443] [PATCH] scripts: pull: Add options for generation management

From: Ludovic Courtès <[email-masked]>
Date: Thu, 19 Sep 2019 13:55:56 +0200

Konrad Hinsen <[email-masked]> skribis:

> Ludovic Courtès <[email-masked]> writes:
>
>>> And since I am in criticizing mood, the whole Guix management API
>>> suffers from bad naming. Consider "guix pull -l". What does it pull?  Or
>>> "guix package –-roll-back", which doesn't roll back a package but a
>>> profile. Guix is following the lead of git whose command line API makes
>>> sense only to people who have seen it grow historically.
>>
>> What would you suggest?  “guix log”, “guix roll-back”?
>
> I don't have a detailed and thought-out plan, but here are some ideas:
>
>  - Everything that modifies a profile (the standard package kind) starts
>    with "profile":
>
>      guix profile <profile-path> install ...
>      guix profile <profile-path> remove ...
>      guix profile <profile-path> roll-back
>
>    The <profile-path> could be made optional in some way for working
>    on the default profile.

OK.  A “guix profile” command has been proposed before.  I think it
makes sense in terms of taxonomy, but I don’t find it pretty in terms of
UI.

Also, now that we finally have “guix install” & co., which is really
what users expect, I feel less of an incentive for a catch-all “guix
profile” command.

Maybe we need more of these aliases, though, like “guix show”.

>  - The profile-independent operations of "guix package" already have
>    nice aliases, e.g. "guix search". So "guix package" could go away.

Yeah.  (In practice ‘guix package’ would have to be kept around, but
it’s OK since all these commands share the same code.)

>  - Everything that operates on "guix" (the software, including the
>    package definitions) starts with "itself":
>
>      guix itself update  (today's "guix pull")
>      guix itself roll-back

It’s a another instance where the categorization you propose makes sense
to me, but as a command I’d have to type, it’s not something I like.

Thanks,
Ludo’.