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 sQ+KIQgyA2AEYgAA0tVLHw (envelope-from ) for ; Sat, 16 Jan 2021 18:35:52 +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 CGrLHAgyA2CpYwAA1q6Kng (envelope-from ) for ; Sat, 16 Jan 2021 18:35:52 +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 072979403D6 for ; Sat, 16 Jan 2021 18:35:52 +0000 (UTC) Received: from localhost ([::1]:41036 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0qQR-0004nI-18 for larch@yhetil.org; Sat, 16 Jan 2021 13:35:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51138) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0qPg-0004JO-3c for guix-patches@gnu.org; Sat, 16 Jan 2021 13:35:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60732) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0qPf-0006OM-SN for guix-patches@gnu.org; Sat, 16 Jan 2021 13:35:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l0qPf-0002XK-Q0 for guix-patches@gnu.org; Sat, 16 Jan 2021 13:35:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45919] [PATCH 6/8] guix describe: Use 'manifest-entry-channel'. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 16 Jan 2021 18:35:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45919 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 45919@debbugs.gnu.org Received: via spool by 45919-submit@debbugs.gnu.org id=B45919.16108220729661 (code B ref 45919); Sat, 16 Jan 2021 18:35:03 +0000 Received: (at 45919) by debbugs.gnu.org; 16 Jan 2021 18:34:32 +0000 Received: from localhost ([127.0.0.1]:44036 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0qP9-0002Ve-Qj for submit@debbugs.gnu.org; Sat, 16 Jan 2021 13:34:32 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57946) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l0qP6-0002UK-Kt for 45919@debbugs.gnu.org; Sat, 16 Jan 2021 13:34:29 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57164) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0qP1-0006CR-Eo; Sat, 16 Jan 2021 13:34:23 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=36420 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l0qP0-0000li-Ul; Sat, 16 Jan 2021 13:34:23 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Sat, 16 Jan 2021 19:34:07 +0100 Message-Id: <20210116183409.31229-6-ludo@gnu.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210116183409.31229-1-ludo@gnu.org> References: <20210116183409.31229-1-ludo@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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: -1.85 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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-Migadu-Queue-Id: 072979403D6 X-Spam-Score: -1.85 X-Migadu-Scanner: scn0.migadu.com X-TUID: 2kcwMB83rKZx * guix/channels.scm (manifest-entry-channel): Export. * guix/scripts/describe.scm (display-profile-content): Use it. --- guix/channels.scm | 1 + guix/scripts/describe.scm | 30 ++++++++++++------------------ 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/guix/channels.scm b/guix/channels.scm index 6449221c3f..743b4a25b7 100644 --- a/guix/channels.scm +++ b/guix/channels.scm @@ -91,6 +91,7 @@ ensure-forward-channel-update profile-channels + manifest-entry-channel channel-news-entry? channel-news-entry-commit diff --git a/guix/scripts/describe.scm b/guix/scripts/describe.scm index c3667516eb..b7ec029ba8 100644 --- a/guix/scripts/describe.scm +++ b/guix/scripts/describe.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2018, 2019, 2020 Ludovic Courtès +;;; Copyright © 2018, 2019, 2020, 2021 Ludovic Courtès ;;; Copyright © 2018 Oleg Pykhalov ;;; Copyright © 2020 Ekaitz Zarraga ;;; @@ -237,23 +237,17 @@ way and displaying details about the channel's source code." (format #t " ~a ~a~%" (manifest-entry-name entry) (manifest-entry-version entry)) - (match (assq 'source (manifest-entry-properties entry)) - (('source ('repository ('version 0) - ('url url) - ('branch branch) - ('commit commit) - _ ...)) - (let ((channel (channel (name 'nameless) - (url url) - (branch branch) - (commit commit)))) - (format #t (G_ " repository URL: ~a~%") url) - (when branch - (format #t (G_ " branch: ~a~%") branch)) - (format #t (G_ " commit: ~a~%") - (if (supports-hyperlinks?) - (channel-commit-hyperlink channel commit) - commit)))) + (match (manifest-entry-channel entry) + ((? channel? channel) + (format #t (G_ " repository URL: ~a~%") + (channel-url channel)) + (when (channel-branch channel) + (format #t (G_ " branch: ~a~%") + (channel-branch channel))) + (format #t (G_ " commit: ~a~%") + (if (supports-hyperlinks?) + (channel-commit-hyperlink channel) + (channel-commit channel)))) (_ #f))) ;; Show most recently installed packages last. -- 2.30.0