guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#27865] [PATCH 0/3] Use Guile-Git for 'guix pull'


From: Ludovic Courtès
Subject: [bug#27865] [PATCH 0/3] Use Guile-Git for 'guix pull'
Date: Mon, 31 Jul 2017 17:25:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Ludovic Courtès <address@hidden> skribis:

> This change makes Guile-Git a hard dependency.  The transition might be
> somewhat bumpy since it’s possible that users not having Guile-Git
> installed will run ‘guix pull’ and, upon completion, will get an error
> when they re-run ‘guix pull’.  This will be fixed by installing
> ‘guile-git’.  Thinking about it, (guix scripts pull) could perhaps try
> to be smart and have an error message saying “please install Guile-Git”
> or something.

I think we can go as far as installing Guile-Git in the user’s profile,
like this:

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
 
The other option is to simply print the warning and hope the user will
act accordingly.

Thoughts?

Ludo’.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]