unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: 36699@debbugs.gnu.org
Subject: [bug#36699] [PATCH 2/4] channels: Remove unneeded 'version' field of <channel-metadata>.
Date: Wed, 17 Jul 2019 01:24:31 +0200	[thread overview]
Message-ID: <20190716232433.16789-2-ludo@gnu.org> (raw)
In-Reply-To: <20190716232433.16789-1-ludo@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 (<channel-metadata>)[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>
-  (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 '())
-    (($ <channel-metadata> version directory dependencies)
+    (($ <channel-metadata> directory dependencies)
      dependencies)))
 
 (define* (latest-channel-instances store channels #:optional (previous-channels '()))
-- 
2.22.0

  reply	other threads:[~2019-07-16 23:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-16 23:20 [bug#36699] [PATCH 0/4] Strengthen '.guix-channel' file handling Ludovic Courtès
2019-07-16 23:24 ` [bug#36699] [PATCH 1/4] channels: Strictly check the version of '.guix-channel' Ludovic Courtès
2019-07-16 23:24   ` Ludovic Courtès [this message]
2019-07-16 23:24   ` [bug#36699] [PATCH 3/4] channels: Always provide a <channel-metadata> record Ludovic Courtès
2019-07-16 23:24   ` [bug#36699] [PATCH 4/4] channels: Reject directories with '..' in '.guix-channel' file Ludovic Courtès
2019-07-16 23:29     ` Ludovic Courtès
2019-07-18  9:58       ` Danny Milosavljevic
2019-07-18 13:44         ` Ludovic Courtès
2019-07-19  9:54 ` bug#36699: [PATCH 0/4] Strengthen '.guix-channel' file handling 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=20190716232433.16789-2-ludo@gnu.org \
    --to=ludo@gnu.org \
    --cc=36699@debbugs.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).