From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
To: myglc2 <myglc2@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: Reorganizing guix package commands
Date: Tue, 19 Apr 2016 15:43:08 +0200 [thread overview]
Message-ID: <idjtwix1zpv.fsf@bimsb-sys02.mdc-berlin.net> (raw)
In-Reply-To: <86vb3dycr2.fsf@gmail.com>
myglc2 <myglc2@gmail.com> writes:
> Alex Kost <alezost@gmail.com> writes:
>
>> Ludovic Courtès (2016-04-18 20:20 +0300) wrote:
>>
>>> Alex Kost <alezost@gmail.com> skribis:
>>>
>>>> I've just sent a message to bug#22587¹, but I realized it is better to
>>>> discuss it here in a separate thread.
>>>>
>>>> So, I think there are inconsistencies in guix commands. For example, we
>>>> have "guix system build" to build a system, but "guix build" to build a
>>>> package. IMO "guix package build" would be a better choice.
>>>>
>>>> In general, I think it would be good to move package commands inside
>>>> "guix package", e.g, to make "guix package lint", "guix package size",
>>>> etc.
>>>
>>> Why not consider “package” to be the default word? :-)
>>
>> Interesting, but why do we need to have "guix package" at all? Let's
>> just use "guix --install", etc. (This is not what I suggest :-))
>>
>>> I can see how adding “package” everywhere helps categorize things
>>> mentally, but as a user interface, I think it would be rather bad.
>>
>> As a user, I think it would be rather good. (This is just my user opinion)
>>
>>> Also, it’s not that simple: “guix size” can take a store item instead of
>>> a package name, “guix graph” cannot do it yet but it would be useful if
>>> it could (“guix graph -t references $(readlink -f /run/current-system)”),
>>> etc.
>>
>> Hm, OK, I'm not sure, but let's leave "graph" and "size" alone for now.
>>
>>> I still think that having aliases like “guix install” as Andy proposed
>>> long ago would be useful, though I never started working on it.
>>
>> I agree! Except I think they should be inside "guix package":
>>
>> guix package install ...
>> guix package remove ...
>>
>> As for the transactional operations (I mean remove/install in one
>> command), I think we can do it in a separate "guix profile" command:
>>
>> guix profile --install ... --remove ...
>>
>>> There are probably other improvements to do around “guix package” (maybe
>>> turning some of its options into separate sub-commands as was suggested
>>> before.) All we need is a clear view of where we’re going and patches. :-)
>>
>> Here is the summary of the changes I think it would be good to have:
>>
>> | Replace this: | With this: |
>> |-----------------------------------+-----------------------------------|
>> | guix build | guix package build |
>> | guix edit | guix package definition¹ |
>> | guix import | guix package import |
>> | guix lint | guix package lint |
>> | guix refresh | guix package refresh |
>> | guix package --show | guix package show |
>> | guix package --search | guix package search |
>> | guix package --list-available | guix package list |
>> |-----------------------------------+-----------------------------------|
>> | guix package --list-generations | guix profile --list-generations |
>> | guix package --list-installed | guix profile --list-installed |
>> | guix package --delete-generations | guix profile --delete-generations |
>> | guix package --switch-generations | guix profile --switch-generations |
>> | guix package --roll-back | guix profile --roll-back |
>> | guix package --manifest | guix profile --manifest |
>>
>> ¹ "edit" name is confusing: <http://bugs.gnu.org/22587>
>>
>> Maybe instead of --list-generations and others, these options should
>> transform into subcommands (list-generations) of "guix profile".
>
> The term 'profile' is used at user- and system- levels:
>
> 3.1 Features
> ============
> [...]
> Instead of referring to these directories, users have their own
> “profile”, which points to the packages that they actually want to use.
> These profiles are stored within each user’s home directory, at
> ‘$HOME/.guix-profile’.
>
> 7.2.2 ‘operating-system’ Reference
> ----------------------------------
> ‘packages’ (default: %BASE-PACKAGES)
> The set of packages installed in the global profile, which is
> accessible at ‘/run/current-system/profile’.
>
> ... and in home directories:
>
> /home/user1/.guix-profile -> /var/guix/profiles/per-user/user1/guix-profile
> /home/user1/.profile
>
> Making the use of 'profile' here ambiguous. So I suggest that you change
> 'guix profile ...' to 'guix user ...' like so:
I don’t think it’s ambiguous at all. The system profile is a profile
like any other, so you can, for example, list installed packages like
this:
guix package -p /run/booted-system/profile \
--list-installed
What doesn’t work is to operate on generations because the booted-system
profile is a direct link to a store item; there is no indirection. You
also cannot use “--manifest” on it because the profile contents are
controlled via “guix system reconfigure /path/to/config.scm”.
Rather than making the differences bigger, I think we should unify
profile management, i.e. make more of the commands for regular profiles
work with the system profile (provided a user has root privileges).
> |-----------------------------------+--------------------------------|
> | guix package --list-generations | guix user --list-generations |
> | guix package --list-installed | guix user --list-installed |
> | guix package --delete-generations | guix user --delete-generations |
> | guix package --switch-generations | guix user --switch-generations |
> | guix package --roll-back | guix user --roll-back |
> | guix package --manifest | guix user --manifest |
>
> and similarly, the above ...
>
>> guix package install ...
>> guix package remove ...
>
> ... would become ...
>
> guix user install ...
> guix user remove ...
I don’t think this is a good idea. In addition to the reasons I stated
above “user” is even more vague than “package” is. The proposal to use
“profile” for profile-related operations is a very natural one.
Here at the MDC we are using many different profiles on a regular
basis. Multiple profiles is a common use-case. Operating on profiles
with “guix profile” seems really appropriate; doing this via “guix user”
is confusing to me. I don’t know what “user” stands for.
~~ Ricardo
next prev parent reply other threads:[~2016-04-19 13:43 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-18 8:57 Reorganizing guix package commands Alex Kost
2016-04-18 16:10 ` John Darrington
2016-04-19 8:01 ` Alex Kost
2016-04-18 17:20 ` Ludovic Courtès
2016-04-18 21:50 ` myglc2
2016-04-19 5:17 ` John Darrington
2016-04-19 12:57 ` myglc2
2016-04-19 13:03 ` Thompson, David
2016-04-19 13:35 ` John Darrington
2016-04-19 13:51 ` myglc2
2016-04-19 15:24 ` Ludovic Courtès
2016-04-19 10:47 ` Alex Kost
2016-04-19 10:58 ` Ricardo Wurmus
2016-04-19 12:45 ` myglc2
2016-04-19 7:52 ` Alex Kost
2016-04-19 9:17 ` Taylan Ulrich Bayırlı/Kammer
2016-04-19 10:37 ` Alex Kost
2016-04-19 9:23 ` Hartmut Goebel
2016-04-19 10:16 ` Alex Kost
2016-04-19 14:39 ` John Darrington
2016-04-19 13:00 ` myglc2
2016-04-19 13:43 ` Ricardo Wurmus [this message]
2016-04-19 14:29 ` myglc2
2016-04-19 13:55 ` Ricardo Wurmus
2016-04-19 15:52 ` Ludovic Courtès
2016-04-19 19:56 ` Christopher Allan Webber
2016-04-20 3:45 ` myglc2
2016-04-20 5:34 ` John Darrington
2016-04-20 8:52 ` Alex Kost
2016-04-20 17:05 ` myglc2
2016-04-20 8:29 ` Alex Kost
2016-04-20 9:46 ` Taylan Ulrich Bayırlı/Kammer
2016-04-20 21:45 ` Ludovic Courtès
2016-04-21 12:34 ` myglc2
2016-04-21 5:20 ` John Darrington
2016-04-20 9:29 ` Taylan Ulrich Bayırlı/Kammer
2016-04-21 2:49 ` Efraim Flashner
2016-04-21 7:10 ` Taylan Ulrich Bayırlı/Kammer
2016-04-18 21:13 ` Hartmut Goebel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=idjtwix1zpv.fsf@bimsb-sys02.mdc-berlin.net \
--to=ricardo.wurmus@mdc-berlin.de \
--cc=guix-devel@gnu.org \
--cc=myglc2@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.