From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: [PATCH] Emacs interface for Guix Date: Tue, 12 Aug 2014 20:20:37 +0400 Message-ID: <87ppg5el2i.fsf@gmail.com> References: <87k3719v7p.fsf@gmail.com> <87r419fa50.fsf@gnu.org> <87fvho9fqm.fsf@gmail.com> <87a97taixl.fsf@gmail.com> <87sil2rbly.fsf@gnu.org> <87tx5idn7f.fsf_-_@gmail.com> <87egwlkcy1.fsf@gnu.org> 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]:54847) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHEoc-0005QH-7A for guix-devel@gnu.org; Tue, 12 Aug 2014 12:20:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHEoS-0007g6-1S for guix-devel@gnu.org; Tue, 12 Aug 2014 12:20:50 -0400 In-Reply-To: <87egwlkcy1.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 12 Aug 2014 16:19:34 +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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org Ludovic Court=C3=A8s (2014-08-12 18:19 +0400) wrote: > Alex Kost skribis: > >> Thanks for pointing. I've never contributed to a real project, so I >> don't know the rules actually :) > > No problem. :-) There might still be unwritten rules, but we can fix > that as we go. > >> From af4b8495969d70d59aa9f3f296628daeaf80b0d2 Mon Sep 17 00:00:00 2001 >> From: Alex Kost >> Date: Tue, 12 Aug 2014 12:32:16 +0400 >> Subject: [PATCH 1/2] profiles: Add 'manifest-add'. >> >> * guix/profiles.scm (manifest-add): New procedure. >> * tests/profiles.scm (guile-1.8.8): New variable. >> ("manifest-add"): New test. > > Perfect. I=E2=80=99ve pushed it, followed by a patch that changes > guix/scripts/package.scm to use =E2=80=98manifest-add=E2=80=99 (comments = welcome.) Thanks, you forgot to delete =E2=80=98same-package?=E2=80=99 from =E2=80=98= guix-package=E2=80=99 [=E2=80=98process-actions=E2=80=99] in your commit =E2=80=93 it is a part o= f =E2=80=98manifest-add=E2=80=99 now. >> From 5fd45b3f4216921837f522d56b20c4be0a58fe8e Mon Sep 17 00:00:00 2001 >> From: Alex Kost >> Date: Tue, 12 Aug 2014 13:54:23 +0400 >> Subject: [PATCH 2/2] guix package: Add 'process-package-actions'. >> >> * guix/scripts/package.scm (process-package-actions): New procedure. >> (guix-package): Use it. >> [ensure-default-profile]: Move to top-level. >> [substitutes?]: New variable. >> [same-package?]: Remove. >> (options->installable, options->removable): Change according to >> 'process-package-actions'. > > This patch would need to be rebased on top of f48624f. > > Were you planning on using =E2=80=98process-package-actions=E2=80=99 in t= he Emacs > interface? Yes, actually I've been using that function for a couple of weeks, I just didn't update "guix.el" repo for that. But your suggestion below is definitely better. > That seems like a coarse-grain and clumsy interface. Perhaps there are > tinier parts of it that could be moved to (guix profiles)? For > instance, there=E2=80=99s no =E2=80=98manifest-upgrade=E2=80=99 at the mo= ment. I think =E2=80=98manifest-add=E2=80=99 already does what =E2=80=98manifest-= upgrade=E2=80=99 would do: it replaces entries with the same name. So if there is installed =E2=80=9Cguile-2.0.11:out=E2=80=9D and a user installs =E2=80=9Cguile-1.8.8= :out=E2=80=9D, the previously installed guile is removed from manifest. I thought it's intended behaviour and that's why =E2=80=98options->installable=E2=80=99 combines = =E2=80=9Cto-install=E2=80=9D and =E2=80=9Cto-upgrade=E2=80=9D options. Could you explain what =E2=80=98= manifest-upgrade=E2=80=99 should do? > What about introducing a type that would contain > a list of packages to install, to remove, and to upgrade, and we could do: I think only =E2=80=9Cinstall=E2=80=9D part should contain a list of packag= es (or (PACKAGE OUTPUT) things). Upgrading and removing can be performed on obsolete packages, so only a package specification of an installed package is known in such cases. Perhaps any pattern (package (with "out" output), (package output), name specification) should be accepted. So there will be =E2=80=98make-manifest-transaction=E2=80=99 function with = #:install, #:upgrade, #:remove keys. Do I understand it right? > ;; Show what will/would be installed, removed, etc. > (show-transaction manifest transaction #:dry-run? bool) > > ;; Do the installation/removal/upgrades listed in TRANSACTION, and > ;; return the new manifest. > (manifest-perform-transaction manifest transaction) So =E2=80=98manifest-perform-transaction=E2=80=99 will open connection? If= so, shouldn't it accept '#:dry-run' and '#:use-substitutes?' keys? -- Alex