From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: Reorganizing guix package commands Date: Tue, 19 Apr 2016 13:37:42 +0300 Message-ID: <87d1plj349.fsf@gmail.com> References: <874mazi99k.fsf@gmail.com> <877ffual6i.fsf@gnu.org> <877ffujasf.fsf@gmail.com> <871t62555i.fsf@T420.taylan> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41572) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1asT2S-0008HQ-Hk for guix-devel@gnu.org; Tue, 19 Apr 2016 06:37:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1asT2O-0003hT-Da for guix-devel@gnu.org; Tue, 19 Apr 2016 06:37:48 -0400 Received: from mail-lf0-x242.google.com ([2a00:1450:4010:c07::242]:36032) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1asT2N-0003gS-Vj for guix-devel@gnu.org; Tue, 19 Apr 2016 06:37:44 -0400 Received: by mail-lf0-x242.google.com with SMTP id j10so1923217lfg.3 for ; Tue, 19 Apr 2016 03:37:43 -0700 (PDT) In-Reply-To: <871t62555i.fsf@T420.taylan> ("Taylan Ulrich \=\?utf-8\?Q\?\=5C\=22Bay\=C4\=B1rl\=C4\=B1\=2FKammer\=5C\=22\=22's\?\= message of "Tue, 19 Apr 2016 11:17:29 +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: Taylan Ulrich =?utf-8?Q?=22Bay=C4=B1rl=C4=B1?= =?utf-8?Q?=2FKammer=22?= Cc: guix-devel@gnu.org Taylan Ulrich "Bay=C4=B1rl=C4=B1/Kammer" (2016-04-19 12:17 +0300) wrote: > Alex Kost writes: > >> 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=C2=B9 = | >> | 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 | >> >> =C2=B9 "edit" name is confusing: > > How about "view"? ("Definition" is so long.) I prefer "definition", but it's just my opinion. Maybe we can use the same feature as some other software use, like you can write: "ip address" or "ip addr" or even "ip a". I.e., if some portion of characters defines a subcommand name unambiguously, it's ok to use. So this could become "guix package def" or "guix package d" if there will be no other subcommands beginning with "d". I think it would be a great feature (I already wish to write "guix env" or "guix sy re" :-)). I think it is for a separate thread though. >> Maybe instead of --list-generations and others, these options should >> transform into subcommands (list-generations) of "guix profile". > > Yeah, seems more consistent. > > I don't have a strong opinion on this whole thing but I think a clear > and logical categorization like the above would be a good base. One > could then add abbreviations on top of it like: > > guix install -> guix package install > > Hmm, or does 'install' belong to 'profile'? Or should the whole thing > be called 'guix profile add'? "Install" kinda implies that something > new will be installed into the system, rather than just some symlinks > shuffled. (One can see the building or downloading as a special case / > transparent handling of the case where the package to be added to the > profile is not in the store yet.) Yes, this is controversial. I think it would be clean to separate profile stuff into a separate command ("guix profile"). As for adding "guix package install/remove", I don't really know. > BTW if it is to become e.g. 'guix profile add', then combining an > add/remove in one transaction (if it's important to keep that feature) I think this is a very important feature. > could look like: > > guix package add foo bar -- remove baz bat To be honest I don't like it. There is also "upgrade" which can be performed along with install and remove. But I like "--add" instead of or along with (as they may just co-exist and do the same thing) "--install" in a potential "guix profile" command. --=20 Alex