[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’.
- [bug#27865] [PATCH 0/3] Use Guile-Git for 'guix pull', Ludovic Courtès, 2017/07/28
- [bug#27865] [PATCH 1/3] build: Make Guile-Git a hard requirement., Ludovic Courtès, 2017/07/28
- [bug#27865] [PATCH 3/3] pull: Use the commit ID as the version string., Ludovic Courtès, 2017/07/28
- [bug#27865] [PATCH 2/3] pull: Fetch source code from Git., Ludovic Courtès, 2017/07/28
- [bug#27865] [PATCH 2/3] pull: Fetch source code from Git., Mathieu Othacehe, 2017/07/30
- [bug#27865] [PATCH 2/3] pull: Fetch source code from Git., Ludovic Courtès, 2017/07/30
- [bug#27865] [PATCH 2/3] pull: Fetch source code from Git., Mathieu Othacehe, 2017/07/31
- [bug#27865] [PATCH 2/3] pull: Fetch source code from Git., Ludovic Courtès, 2017/07/31
- [bug#27865] [PATCH 2/3] pull: Fetch source code from Git., Mathieu Othacehe, 2017/07/31
[bug#27865] [PATCH 0/3] Use Guile-Git for 'guix pull',
Ludovic Courtès <=