GNU bug report logs - #37869
[PATCH] pull: Honor '/etc/guix/channels.scm'.

Previous Next

Package: guix-patches;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Tue, 22 Oct 2019 16:08:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ludovic Courtès <ludo <at> gnu.org>
Subject: bug#37869: closed (Re: [bug#37869] [PATCH] pull: Honor
 '/etc/guix/channels.scm'.)
Date: Sun, 27 Oct 2019 22:24:01 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#37869: [PATCH] pull: Honor '/etc/guix/channels.scm'.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 37869 <at> debbugs.gnu.org.

-- 
37869: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=37869
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: 37869-done <at> debbugs.gnu.org
Subject: Re: [bug#37869] [PATCH] pull: Honor '/etc/guix/channels.scm'.
Date: Sun, 27 Oct 2019 23:23:25 +0100
Hi,

Ludovic Courtès <ludo <at> gnu.org> skribis:

> From: Ludovic Courtès <ludovic.courtes <at> inria.fr>
>
> * guix/scripts/pull.scm (channel-list)[global-file]: New variable.
> [channels]: Honor it.
> * doc/guix.texi (Invoking guix pull): Document it.

Pushed as 49af34cfac89d384c46269bfd9388b2c73b1220a.

Julien Lepiller <julien <at> lepiller.eu> skribis:

> French:

Thank you, Julien; added with minor tweaks.

Ludo’.

[Message part 3 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: guix-patches <at> gnu.org
Cc: Ludovic Courtès <ludovic.courtes <at> inria.fr>
Subject: [PATCH] pull: Honor '/etc/guix/channels.scm'.
Date: Tue, 22 Oct 2019 18:07:03 +0200
From: Ludovic Courtès <ludovic.courtes <at> inria.fr>

* guix/scripts/pull.scm (channel-list)[global-file]: New variable.
[channels]: Honor it.
* doc/guix.texi (Invoking guix pull): Document it.
---
 doc/guix.texi         | 18 +++++++++++++++++-
 guix/scripts/pull.scm |  5 +++++
 2 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index b550b1c34a..ec331c37cd 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -3666,6 +3666,21 @@ descriptions, and deploys it.  Source code is downloaded from a
 @uref{https://git-scm.com, Git} repository, by default the official
 GNU <at> tie{}Guix repository, though this can be customized.
 
+Specifically, @command{guix pull} downloads code from the @dfn{channels}
+(@pxref{Channels}) specified by one of the followings, in this order:
+
+@enumerate
+@item
+the @option{--channels} option;
+@item
+the user's @file{~/.config/guix/channels.scm} file;
+@item
+the system-wide @file{/etc/guix/channels.scm} file;
+@item
+the built-in default channels specified in the @code{%default-channels}
+variable.
+@end enumerate
+
 On completion, @command{guix package} will use packages and package
 versions from this just-retrieved copy of Guix.  Not only that, but all
 the Guix commands and Scheme modules will also be taken from that latest
@@ -3763,7 +3778,8 @@ configuration in the @file{~/.config/guix/channels.scm} file or using the
 @item --channels=@var{file}
 @itemx -C @var{file}
 Read the list of channels from @var{file} instead of
-@file{~/.config/guix/channels.scm}.  @var{file} must contain Scheme code that
+@file{~/.config/guix/channels.scm} or @file{/etc/guix/channels.scm}.
+@var{file} must contain Scheme code that
 evaluates to a list of channel objects.  @xref{Channels}, for more
 information.
 
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 7876019eac..80d070652b 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -714,6 +714,9 @@ transformations specified in OPTS (resulting from '--url', '--commit', or
   (define default-file
     (string-append (config-directory) "/channels.scm"))
 
+  (define global-file
+    (string-append %sysconfdir "/guix/channels.scm"))
+
   (define (load-channels file)
     (let ((result (load* file (make-user-module '((guix channels))))))
       (if (and (list? result) (every channel? result))
@@ -725,6 +728,8 @@ transformations specified in OPTS (resulting from '--url', '--commit', or
            (load-channels file))
           ((file-exists? default-file)
            (load-channels default-file))
+          ((file-exists? global-file)
+           (load-channels global-file))
           (else
            %default-channels)))
 
-- 
2.23.0




This bug report was last modified 5 years and 200 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.