From mboxrd@z Thu Jan 1 00:00:00 1970 From: myglc2 Subject: Re: Reorganizing guix package commands Date: Tue, 19 Apr 2016 09:00:33 -0400 Message-ID: <86vb3dycr2.fsf@gmail.com> References: <874mazi99k.fsf@gmail.com> <877ffual6i.fsf@gnu.org> <877ffujasf.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49002) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1asVL5-0008DB-IE for guix-devel@gnu.org; Tue, 19 Apr 2016 09:05:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1asVL1-0006sk-3n for guix-devel@gnu.org; Tue, 19 Apr 2016 09:05:11 -0400 Received: from plane.gmane.org ([80.91.229.3]:59920) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1asVL0-0006sB-QV for guix-devel@gnu.org; Tue, 19 Apr 2016 09:05:07 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1asVKx-0003XJ-Qw for guix-devel@gnu.org; Tue, 19 Apr 2016 15:05:03 +0200 Received: from c-73-167-118-254.hsd1.ma.comcast.net ([73.167.118.254]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 19 Apr 2016 15:05:03 +0200 Received: from myglc2 by c-73-167-118-254.hsd1.ma.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 19 Apr 2016 15:05:03 +0200 List-Id: "Development of GNU Guix and the GNU System distribution." 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" To: guix-devel@gnu.org Alex Kost writes: > Ludovic Courtès (2016-04-18 20:20 +0300) wrote: > >> Alex Kost 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: > > 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: |-----------------------------------+--------------------------------| | 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 ...