From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51890) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcCb4-0005Qo-FM for guix-patches@gnu.org; Mon, 31 Jul 2017 11:27:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcCb0-00039z-E1 for guix-patches@gnu.org; Mon, 31 Jul 2017 11:27:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:32849) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dcCb0-00039r-9Y for guix-patches@gnu.org; Mon, 31 Jul 2017 11:27:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dcCb0-0004mi-59 for guix-patches@gnu.org; Mon, 31 Jul 2017 11:27:02 -0400 Subject: [bug#27865] [PATCH 0/3] Use Guile-Git for 'guix pull' Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20170728202814.5355-1-ludo@gnu.org> Date: Mon, 31 Jul 2017 17:25:52 +0200 In-Reply-To: <20170728202814.5355-1-ludo@gnu.org> ("Ludovic \=\?utf-8\?Q\?Cour\?\= \=\?utf-8\?Q\?t\=C3\=A8s\=22's\?\= message of "Fri, 28 Jul 2017 22:28:14 +0200") Message-ID: <87o9s039xb.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 27865@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s skribis: > This change makes Guile-Git a hard dependency. The transition might be > somewhat bumpy since it=E2=80=99s possible that users not having Guile-Git > installed will run =E2=80=98guix pull=E2=80=99 and, upon completion, will= get an error > when they re-run =E2=80=98guix pull=E2=80=99. This will be fixed by inst= alling > =E2=80=98guile-git=E2=80=99. Thinking about it, (guix scripts pull) coul= d perhaps try > to be smart and have an error message saying =E2=80=9Cplease install Guil= e-Git=E2=80=9D > or something. I think we can go as far as installing Guile-Git in the user=E2=80=99s prof= ile, like this: --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/build-aux/build-self.scm b/build-aux/build-self.scm index 8fb9af23c..2f636ec56 100644 --- a/build-aux/build-self.scm +++ b/build-aux/build-self.scm @@ -240,6 +240,17 @@ files." #:guile-for-build guile))) +(unless (false-if-exception (resolve-interface '(git))) + (if guile-git + (begin + (format (current-error-port) + "installing '~a', which is a new requirement of 'guix pull'...~%" + (package-name guile-git)) + ((@ (guix scripts package) guix-package) "-i" + (package-name guile-git))) + (format (current-error-port) + "warning: Please install 'guile-git' upon completion!~%"))) + ;; This file is loaded by 'guix pull'; return it the build procedure. build --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable The other option is to simply print the warning and hope the user will act accordingly. Thoughts? Ludo=E2=80=99. --=-=-=--