From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 1oxVJmdiwF8CNgAA0tVLHw (envelope-from ) for ; Fri, 27 Nov 2020 02:20:23 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id MCOVIWdiwF+IGwAA1q6Kng (envelope-from ) for ; Fri, 27 Nov 2020 02:20:23 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2CB6994023A for ; Fri, 27 Nov 2020 02:20:23 +0000 (UTC) Received: from localhost ([::1]:40384 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kiTMz-0004w3-Uq for larch@yhetil.org; Thu, 26 Nov 2020 21:20:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52052) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kiTMh-0004vu-Pg for guix-patches@gnu.org; Thu, 26 Nov 2020 21:20:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60062) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kiTMg-0006lO-4H for guix-patches@gnu.org; Thu, 26 Nov 2020 21:20:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kiTMf-0007W6-Vc for guix-patches@gnu.org; Thu, 26 Nov 2020 21:20:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#44630] [PATCH] channels: Expose the default channel in %default-channel Resent-From: Zhu Zihao Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 27 Nov 2020 02:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44630 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 44630@debbugs.gnu.org Received: via spool by 44630-submit@debbugs.gnu.org id=B44630.160644358028861 (code B ref 44630); Fri, 27 Nov 2020 02:20:01 +0000 Received: (at 44630) by debbugs.gnu.org; 27 Nov 2020 02:19:40 +0000 Received: from localhost ([127.0.0.1]:43375 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kiTMK-0007VQ-21 for submit@debbugs.gnu.org; Thu, 26 Nov 2020 21:19:40 -0500 Received: from mail-m973.mail.163.com ([123.126.97.3]:35812) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kiTMF-0007VC-Dv for 44630@debbugs.gnu.org; Thu, 26 Nov 2020 21:19:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Message-ID:Date:MIME-Version; bh=iQLNp Pnx9qbRpqtAdi+82IHy9yuXFwpuorLyw5smsIk=; b=jcPd9b2gaFvI5ccUj77q2 lpNsa3BzSWF30dFZrigrYTPnmO0Tl0hD8ulXrXJKyZj29Tneh5VLk0KrjsMJ3UxD A1EBv8DePhVCKZnBtDvys7Bdx8bfOsE+azsCm4o6DWJrGTrc9pF+Q3HtNcZDC7ql s+GN/dKoZpH18cD4aOrua0= Received: from asus-laptop (unknown [27.39.89.159]) by smtp3 (Coremail) with SMTP id G9xpCgDnyDQyYsBfINKMNA--.32871S2; Fri, 27 Nov 2020 10:19:30 +0800 (CST) References: <86ft5cp2ex.fsf@163.com> <87ft4vzquj.fsf@gnu.org> User-agent: mu4e 1.4.13; emacs 27.1 From: Zhu Zihao In-reply-to: <87ft4vzquj.fsf@gnu.org> Message-ID: <86ft4vh781.fsf@163.com> Date: Fri, 27 Nov 2020 10:19:26 +0800 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-CM-TRANSID: G9xpCgDnyDQyYsBfINKMNA--.32871S2 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxU5BMNDUUUU X-Originating-IP: [27.39.89.159] X-CM-SenderInfo: pdoosuxxwbztlvw6il2tof0z/1tbiFBPpr1aD8GTPRwAAsI X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -3.26 X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=163.com header.s=s110527 header.b=jcPd9b2g; dmarc=fail reason="SPF not aligned (relaxed)" header.from=163.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-TUID: y0yOV+vMDuR7 --=-=-= Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain Sounds reasonable. Patch updated. --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFJBAEBCAAzFiEE7NCVzXX6efyusptG1SOVn+xGFqYFAl/AYi4VHGFsbF9idXRf bGFzdEAxNjMuY29tAAoJENUjlZ/sRhamuMsH/24s4dsvcA691D71/MqqEwIpWDIr /7A9l7JZh0DcLyg3TI1lxpYbyw04IikHyusbjxDr8Ze8oUrWbguHAnQkULibVmpL daM0VnBwrUTRLHgyQdHrfjkoO8dhnesvQnWGYgso85YPuccTVp4z/56ZLrrtKhqh YHALVchas/tw+Hf+LlxWpqKtloNC17WzziAWrQBMAMTkdfT0Q9Ydoi/tOQde5yJq VfidzIeNKEdl31HBM7go9LznkrqAcOevMchSohfOtydHGuM8OhfQMzQiGeJjRdnd UrF3OnUwjurjALtWa2C6zEF9i2y0aUZOPWrYlhyBeOP4aswq0//cAMd/XfE= =guo4 -----END PGP SIGNATURE----- --==-=-=-- --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-channels-Expose-the-default-channel-in-default-chann.patch >From 1548439dbcfaa89b0c03b2d30e794a4374273507 Mon Sep 17 00:00:00 2001 From: Zhu Zihao 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 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Hi, > > Zhu Zihao 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 =E2=80=98%default-channels=E2=80=99 (plural) to preserve the abili= ty to turn > splut Guix into several channels. > > What could work though is your patch, except with the name > =E2=80=98%default-guix-channel=E2=80=99 instead of =E2=80=98%default-chan= nel=E2=80=99, which makes it > clear that it=E2=80=99s just the =E2=80=98guix=E2=80=99 channel. > > Works for you? > > Thanks, > Ludo=E2=80=99. --=20 Retrieve my PGP public key: https://meta.sr.ht/~citreu.pgp Zihao --=-=-=--