guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: Ludovic Courtès
Date: Fri, 1 Sep 2023 12:06:06 -0400 (EDT)

branch: master
commit 0571f954cb1dcd92aab872b4d8f47935e738cdf2
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Aug 31 21:12:01 2023 +0200

    Remove 'sexp->channel*'.
    
    This procedure was introduced in
    9e3e9b691c9517034539ca7483defd88a9e12311 on the grounds that
    'sexp->channel' in (guix channels) did not support the 'branch' field.
    This was fixed in Guix commit
    8f999e1ac26d939e1dfc8fbdfa9316fb412df21a (March 2021).
    
    Furthermore, removing this procedure allows us to store channel
    introductions in the database, which was not the case until now.
    
    * src/cuirass/specification.scm (channel->sexp): Add comment.
    (sexp->channel*): Remove.
    * src/cuirass/database.scm (db-get-specifications): Use 'sexp->channel'.
---
 src/cuirass/database.scm      |  2 +-
 src/cuirass/specification.scm | 17 +----------------
 2 files changed, 2 insertions(+), 17 deletions(-)

diff --git a/src/cuirass/database.scm b/src/cuirass/database.scm
index ccb7146..6e2bf68 100644
--- a/src/cuirass/database.scm
+++ b/src/cuirass/database.scm
@@ -610,7 +610,7 @@ FROM Specifications ORDER BY name ASC;")))
                        (name name)
                        (build (with-input-from-string build read))
                        (channels
-                        (map sexp->channel*
+                        (map sexp->channel
                              (with-input-from-string channels read)))
                        (build-outputs
                         (map sexp->build-output
diff --git a/src/cuirass/specification.scm b/src/cuirass/specification.scm
index b9a016f..d62037e 100644
--- a/src/cuirass/specification.scm
+++ b/src/cuirass/specification.scm
@@ -36,7 +36,6 @@
             sexp->build-output
 
             channel->sexp
-            sexp->channel*
 
             %build-types
 
@@ -99,6 +98,7 @@
 
 (define (channel->sexp channel)
   "Return an sexp describing CHANNEL."
+  ;; XXX: This duplicates 'channel-instance->sexp' from (guix channels).
   (let ((intro (channel-introduction channel)))
     `(repository
       (version 0)
@@ -119,21 +119,6 @@
                     intro))))))
             '()))))
 
-(define (sexp->channel* sexp)
-  "Return the channel corresponding to SEXP."
-  (match sexp
-    (('repository ('version 0)
-                  ('url url)
-                  ('branch branch)
-                  ('commit commit)
-                  ('name name)
-                  rest ...)
-     (channel (name name)
-              (url url)
-              (branch branch)
-              (commit commit)))
-    (_ #f)))
-
 
 ;;;
 ;;; Specification record.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]