unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#44630] [PATCH] channels: Expose the default channel in %default-channel
@ 2020-11-14 12:07 Zhu Zihao
  2020-11-26 22:38 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Zhu Zihao @ 2020-11-14 12:07 UTC (permalink / raw)
  To: 44630


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


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"))
```


[-- 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: 1425 bytes --]

From 2441a555cf9dab16da8b040ebb8b3ff60ccd1f2c Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Sat, 14 Nov 2020 20:02:47 +0800
Subject: [PATCH] channels: Expose the default channel in %default-channel
 variable.

* guix/channels(%default-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..f78712c895 100644
--- a/guix/channels.scm
+++ b/guix/channels.scm
@@ -72,6 +72,7 @@
             openpgp-fingerprint->bytevector
             openpgp-fingerprint
 
+            %default-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-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-channel))
 
 (define (guix-channel? channel)
   "Return true if CHANNEL is the 'guix' channel."
-- 
2.29.2


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


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

Zihao

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#44630] [PATCH] channels: Expose the default channel in %default-channel
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2020-11-26 22:38 UTC (permalink / raw)
  To: Zhu Zihao; +Cc: 44630

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’.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#44630] [PATCH] channels: Expose the default channel in %default-channel
  2020-11-26 22:38 ` Ludovic Courtès
@ 2020-11-27  2:19   ` Zhu Zihao
  2020-11-27  9:58     ` bug#44630: " Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Zhu Zihao @ 2020-11-27  2:19 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 44630


[-- 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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#44630: [PATCH] channels: Expose the default channel in %default-channel
  2020-11-27  2:19   ` Zhu Zihao
@ 2020-11-27  9:58     ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2020-11-27  9:58 UTC (permalink / raw)
  To: Zhu Zihao; +Cc: 44630-done

Hi,

Zhu Zihao <all_but_last@163.com> skribis:

> 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.

Applied, thanks!

Ludo’.




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-27  9:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2020-11-27  9:58     ` bug#44630: " Ludovic Courtès

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).