guix-commits
[Top][All Lists]
Advanced

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

01/08: profiles: Remove support for reading versions 0 and 1.


From: guix-commits
Subject: 01/08: profiles: Remove support for reading versions 0 and 1.
Date: Fri, 8 Jul 2022 17:59:46 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit e7e04396c0e91569bf493e1352d6539babc15327
Author: Ludovic Court├Ęs <ludo@gnu.org>
AuthorDate: Fri Jul 8 11:23:00 2022 +0200

    profiles: Remove support for reading versions 0 and 1.
    
    Version 2 was introduced in commit
    dedb17ad010ee9ef67f3f4f3997dd17f226c8090 (May 2015), which made it into
    Guix 0.9.0.
    
    * guix/profiles.scm (find-package): Remove.
    (sexp->manifest)[infer-search-paths]: Remove.
    Remove clauses for versions 0 and 1.
---
 guix/profiles.scm | 65 +------------------------------------------------------
 1 file changed, 1 insertion(+), 64 deletions(-)

diff --git a/guix/profiles.scm b/guix/profiles.scm
index 701852ae98..a21cc432dc 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -507,34 +507,8 @@ denoting a specific output of a package."
                                  (mapm %state-monad entry->gexp entries)
                                vlist-null))))))
 
-(define (find-package name version)
-  "Return a package from the distro matching NAME and possibly VERSION.  This
-procedure is here for backward-compatibility and will eventually vanish."
-  (define find-best-packages-by-name              ;break abstractions
-    (module-ref (resolve-interface '(gnu packages))
-                'find-best-packages-by-name))
-
-   ;; Use 'find-best-packages-by-name' and not 'find-packages-by-name'; the
-   ;; former traverses the module tree only once and then allows for efficient
-   ;; access via a vhash.
-   (match (find-best-packages-by-name name version)
-     ((p _ ...) p)
-     (_
-      (match (find-best-packages-by-name name #f)
-        ((p _ ...) p)
-        (_ #f)))))
-
 (define (sexp->manifest sexp)
   "Parse SEXP as a manifest."
-  (define (infer-search-paths name version)
-    ;; Infer the search path specifications for NAME-VERSION by looking up a
-    ;; same-named package in the distro.  Useful for the old manifest formats
-    ;; that did not store search path info.
-    (let ((package (find-package name version)))
-      (if package
-          (package-native-search-paths package)
-          '())))
-
   (define (infer-dependency item parent)
     ;; Return a <manifest-entry> for ITEM.
     (let-values (((name version)
@@ -620,44 +594,7 @@ procedure is here for backward-compatibility and will 
eventually vanish."
              (return entry)))))))
 
   (match sexp
-    (('manifest ('version 0)
-                ('packages ((name version output path) ...)))
-     (manifest
-      (map (lambda (name version output path)
-             (manifest-entry
-               (name name)
-               (version version)
-               (output output)
-               (item path)
-               (search-paths (infer-search-paths name version))))
-           name version output path)))
-
-    ;; Version 1 adds a list of propagated inputs to the
-    ;; name/version/output/path tuples.
-    (('manifest ('version 1)
-                ('packages ((name version output path deps) ...)))
-     (manifest
-      (map (lambda (name version output path deps)
-             ;; Up to Guix 0.7 included, dependencies were listed as ("gmp"
-             ;; "/gnu/store/...-gmp") for instance.  Discard the 'label' in
-             ;; such lists.
-             (let ((deps (match deps
-                           (((labels directories) ...)
-                            directories)
-                           ((directories ...)
-                            directories))))
-               (letrec* ((deps* (map (cute infer-dependency <> (delay entry))
-                                     deps))
-                         (entry (manifest-entry
-                                  (name name)
-                                  (version version)
-                                  (output output)
-                                  (item path)
-                                  (dependencies deps*)
-                                  (search-paths
-                                   (infer-search-paths name version)))))
-                 entry)))
-           name version output path deps)))
+    ;; Versions 0 and 1 are no longer produced since 2015.
 
     ;; Version 2 adds search paths and is slightly more verbose.
     (('manifest ('version 2 minor-version ...)



reply via email to

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