unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Zhu Zihao <all_but_last@163.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 44630@debbugs.gnu.org
Subject: [bug#44630] [PATCH] channels: Expose the default channel in %default-channel
Date: Fri, 27 Nov 2020 10:19:26 +0800	[thread overview]
Message-ID: <86ft4vh781.fsf@163.com> (raw)
In-Reply-To: <87ft4vzquj.fsf@gnu.org>


[-- Attachment #1.1: Type: text/plain, Size: 36 bytes --]


Sounds reasonable. Patch updated.


[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 515 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-channels-Expose-the-default-channel-in-default-chann.patch --]
[-- Type: text/x-patch, Size: 1436 bytes --]

From 1548439dbcfaa89b0c03b2d30e794a4374273507 Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Fri, 27 Nov 2020 10:16:29 +0800
Subject: [PATCH] channels: Expose the default channel in %default-channel.

* guix/channels(%default-guix-channel): New variable taken from the inner of
%default-channels.

(%default-channels): Refactored.
---
 guix/channels.scm | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/guix/channels.scm b/guix/channels.scm
index 916d663e9f..0c84eed477 100644
--- a/guix/channels.scm
+++ b/guix/channels.scm
@@ -72,6 +72,7 @@
             openpgp-fingerprint->bytevector
             openpgp-fingerprint
 
+            %default-guix-channel
             %default-channels
             guix-channel?
 
@@ -170,13 +171,16 @@ to the corresponding bytevector."
   ;; URL of the default 'guix' channel.
   "https://git.savannah.gnu.org/git/guix.git")
 
+(define %default-guix-channel
+  (channel
+   (name 'guix)
+   (branch "master")
+   (url %default-channel-url)
+   (introduction %guix-channel-introduction)))
+
 (define %default-channels
   ;; Default list of channels.
-  (list (channel
-         (name 'guix)
-         (branch "master")
-         (url %default-channel-url)
-         (introduction %guix-channel-introduction))))
+  (list %default-guix-channel))
 
 (define (guix-channel? channel)
   "Return true if CHANNEL is the 'guix' channel."
-- 
2.29.2


[-- Attachment #3: Type: text/plain, Size: 1003 bytes --]



Ludovic Courtès writes:

> Hi,
>
> Zhu Zihao <all_but_last@163.com> skribis:
>
>> This expose the inner channel of "%default-channels", this can help user
>> to override the original guix channel with any mirror more conveniently.
>>
>> Before:
>>
>> ```
>> (channel
>>   (inherit (car %default-channels))
>>   (url "url/to/mirror"))
>> ```
>>
>> After:
>>
>> ```
>> (channel
>>   (inherit %default-channel)
>>   (url "https://mirror.guix.org.cn/git/guix"))
>> ```
>
> Hmm I understand the need here, but at the same time, the variable is
> called ‘%default-channels’ (plural) to preserve the ability to turn
> splut Guix into several channels.
>
> What could work though is your patch, except with the name
> ‘%default-guix-channel’ instead of ‘%default-channel’, which makes it
> clear that it’s just the ‘guix’ channel.
>
> Works for you?
>
> Thanks,
> Ludo’.


-- 
Retrieve my PGP public key: https://meta.sr.ht/~citreu.pgp

Zihao

  reply	other threads:[~2020-11-27  2:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-14 12:07 [bug#44630] [PATCH] channels: Expose the default channel in %default-channel Zhu Zihao
2020-11-26 22:38 ` Ludovic Courtès
2020-11-27  2:19   ` Zhu Zihao [this message]
2020-11-27  9:58     ` bug#44630: " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86ft4vh781.fsf@163.com \
    --to=all_but_last@163.com \
    --cc=44630@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).