From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:60062) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hnWom-00069v-Md for guix-patches@gnu.org; Tue, 16 Jul 2019 19:25:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hnWok-0002hf-Ku for guix-patches@gnu.org; Tue, 16 Jul 2019 19:25:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42485) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hnWog-0002gY-QK for guix-patches@gnu.org; Tue, 16 Jul 2019 19:25:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hnWog-0003Uj-LS for guix-patches@gnu.org; Tue, 16 Jul 2019 19:25:02 -0400 Subject: [bug#36699] [PATCH 2/4] channels: Remove unneeded 'version' field of . Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Wed, 17 Jul 2019 01:24:31 +0200 Message-Id: <20190716232433.16789-2-ludo@gnu.org> In-Reply-To: <20190716232433.16789-1-ludo@gnu.org> References: <20190716232433.16789-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 36699@debbugs.gnu.org The idea is that 'read-channel-metadata' will take care of converting possibly older versions to the current data type. Thus, storing the version number is unnecessary. * guix/channels.scm ()[version]: Remove. (read-channel-metadata, channel-instance-dependencies): Adjust accordingly. --- guix/channels.scm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/guix/channels.scm b/guix/channels.scm index e92148abf2..87ad729a70 100644 --- a/guix/channels.scm +++ b/guix/channels.scm @@ -108,9 +108,8 @@ (checkout channel-instance-checkout)) (define-record-type - (channel-metadata version directory dependencies) + (channel-metadata directory dependencies) channel-metadata? - (version channel-metadata-version) (directory channel-metadata-directory) (dependencies channel-metadata-dependencies)) @@ -130,7 +129,6 @@ if valid metadata could not be read from PORT." (let ((directory (and=> (assoc-ref properties 'directory) first)) (dependencies (or (assoc-ref properties 'dependencies) '()))) (channel-metadata - version directory (map (lambda (item) (let ((get (lambda* (key #:optional default) @@ -180,7 +178,7 @@ file." channel INSTANCE." (match (channel-instance-metadata instance) (#f '()) - (($ version directory dependencies) + (($ directory dependencies) dependencies))) (define* (latest-channel-instances store channels #:optional (previous-channels '())) -- 2.22.0