From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Inconsistencies in 'guix system' and 'guix package' Date: Tue, 27 Oct 2015 17:06:05 +0100 Message-ID: <87pp00s3de.fsf@gnu.org> References: <87y4eoqtdx.fsf@gmail.com> 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]:33655) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zr6lH-0001YI-Tw for guix-devel@gnu.org; Tue, 27 Oct 2015 12:06:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zr6lD-0002BT-Px for guix-devel@gnu.org; Tue, 27 Oct 2015 12:06:11 -0400 In-Reply-To: <87y4eoqtdx.fsf@gmail.com> (Alex Kost's message of "Tue, 27 Oct 2015 17:27:06 +0300") 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Alex Kost Cc: guix-devel@gnu.org Alex Kost skribis: > 1. Should 'guix system' actions share the same options? > > I think it is confusing that recently added 'guix system' actions > (dmd-graph, extension-graph and list-generations) can take the same > command-line options as the other system actions (--dry-run, --no-grub, > etc.), because specifying these options doesn't take any effect. > > Another thing: "guix system --help" displays the same help > message for any action. With 'list-generations' it is even more > confusing, as (unlike the other actions) it takes PATTERN, not FILE as > the positional argument. > > What about splitting 'guix system' into submodules (as it is done for > 'guix import') with putting general bits into (guix scripts system)? I like the idea of submodules =C3=A0 la =E2=80=98guix import=E2=80=99! Wou= ld you like to give it a try? The thing is, all the actions except =E2=80=98list-generati= ons=E2=80=99 have a lot in common. I am indeed unsatisfied with the current situation, but did not have a better idea. > 2. What about adding subcommands for 'guix package'? > > As we have 'guix system list-generations', would it be more consistent > to have 'guix package list-generations' instead of the current 'guix > package --list-generations'? Or the other way around? :-) > More generally, I think there is a similar issue with 'guix package', as > with 'guix system': using some options together doesn't make sense > (e.g., using --keep-failed, --show and --dry-run). For example, the > following command: > > guix package --show=3Dmagit --list-generations=3D1 > > displays generation 1, while the following: > > guix package --list-generations=3D1 --show=3Dmagit > > describes 'magit' package. > > Analogously, would it be appropriate to replace some 'guix package' > options (--show, --list-generations --list-installed, --list-available) > with subcommands ('guix package show', ...)? But then some operations would have no subcommands: install, remove, rollback, etc. So the syntax would be: guix package SUBCOMMAND OPTIONS or: guix package OPTIONS depending on the situation. That=E2=80=99s not great either. Maybe (thinking out loud) we could separate this in: guix package -> for installation, removal, upgrade, rollback guix query -> for list-whatever, show and then we need to find a place for --delete-generations. Thoughts? Seems like a can of worms, definitely post-0.9.0. Ludo=E2=80=99.