[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/07: channels: Gracefully report the lack of a 'guix' channel.
From: |
guix-commits |
Subject: |
04/07: channels: Gracefully report the lack of a 'guix' channel. |
Date: |
Sun, 20 Jan 2019 13:22:09 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit ab6025b52cec792312d465107e9b86d7900c5f93
Author: Ludovic Courtès <address@hidden>
Date: Sun Jan 20 18:11:11 2019 +0100
channels: Gracefully report the lack of a 'guix' channel.
* guix/channels.scm (channel-instance-derivations): Raise an '&message'
condition when CORE-INSTANCE is #f.
---
guix/channels.scm | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/guix/channels.scm b/guix/channels.scm
index eb56c82..e588d86 100644
--- a/guix/channels.scm
+++ b/guix/channels.scm
@@ -28,10 +28,15 @@
#:use-module (guix derivations)
#:use-module (guix store)
#:use-module (guix i18n)
+ #:use-module ((guix utils)
+ #:select (source-properties->location
+ &error-location))
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-2)
#:use-module (srfi srfi-9)
#:use-module (srfi srfi-11)
+ #:use-module (srfi srfi-34)
+ #:use-module (srfi srfi-35)
#:autoload (guix self) (whole-package make-config.scm)
#:autoload (guix inferior) (gexp->derivation-in-inferior) ;FIXME: circular
dep
#:use-module (ice-9 match)
@@ -345,6 +350,17 @@ INSTANCES."
(build-channel-instance instance core deps)))
instance))
+ (unless core-instance
+ (let ((loc (and=> (any (compose channel-location channel-instance-channel)
+ instances)
+ source-properties->location)))
+ (raise (apply make-compound-condition
+ (condition
+ (&message (message "'guix' channel is lacking")))
+ (if loc
+ (list (condition (&error-location (location loc))))
+ '())))))
+
(mapm %store-monad instance->derivation instances))
(define (whole-package-for-legacy name modules)
- branch master updated (ff8a66b -> e5ad2cd), guix-commits, 2019/01/20
- 01/07: channels: Don't pull from the same channel more than once., guix-commits, 2019/01/20
- 05/07: channels: Use 'fold2'., guix-commits, 2019/01/20
- 07/07: gnu: Add pencil2d., guix-commits, 2019/01/20
- 04/07: channels: Gracefully report the lack of a 'guix' channel.,
guix-commits <=
- 03/07: channels: Build channel modules in an inferior., guix-commits, 2019/01/20
- 02/07: inferior: 'gexp->derivation-in-inferior' honors EXP's load path., guix-commits, 2019/01/20
- 06/07: gnu: qjackctl: Disable xunique., guix-commits, 2019/01/20