guix-commits
[Top][All Lists]
Advanced

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

02/04: pull: Create a version 3 manifest.


From: guix-commits
Subject: 02/04: pull: Create a version 3 manifest.
Date: Wed, 31 Aug 2022 07:05:17 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 67a6828b2bb821274757f686f7c685b664339a96
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed Aug 31 12:34:10 2022 +0200

    pull: Create a version 3 manifest.
    
    This makes the profile readable by older Guix instances.  This is a
    followup to c9fbd40785a99e13a59d8e530830ce85220a9871.
    
    Fixes <https://issues.guix.gnu.org/57306>.
    Reported by Arun Isaac <arunisaac@systemreboot.net>.
    
    * guix/profiles.scm (%manifest-format-version): Export.
    * guix/scripts/package.scm (build-and-use-profile): Add #:format-version
    and pass it to 'profile-derivation'.
    * guix/scripts/pull.scm (build-and-install): Pass #:format-version 3.
---
 guix/profiles.scm        | 1 +
 guix/scripts/package.scm | 2 ++
 guix/scripts/pull.scm    | 3 +++
 3 files changed, 6 insertions(+)

diff --git a/guix/profiles.scm b/guix/profiles.scm
index d1dfa13e98..5d0a1081c9 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -128,6 +128,7 @@
             packages->manifest
             ca-certificate-bundle
             %default-profile-hooks
+            %manifest-format-version
             profile-derivation
             profile-search-paths
             load-profile
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 7d92598efa..7ba2661bbb 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -145,6 +145,7 @@ denote ranges as interpreted by 'matching-generations'."
                                 dry-run?
                                 (hooks %default-profile-hooks)
                                 allow-collisions?
+                                (format-version %manifest-format-version)
                                 bootstrap?)
   "Build a new generation of PROFILE, a file name, using the packages
 specified in MANIFEST, a manifest object.  When ALLOW-COLLISIONS? is true,
@@ -154,6 +155,7 @@ hooks\" run when building the profile."
                      (profile-derivation manifest
                                          #:allow-collisions? allow-collisions?
                                          #:hooks (if bootstrap? '() hooks)
+                                         #:format-version format-version
                                          #:locales? (not bootstrap?))))
          (prof     (derivation->output-path prof-drv)))
 
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index b0cc459d63..19224cf70b 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -452,6 +452,9 @@ true, display what would be built without actually building 
it."
   (mlet %store-monad ((manifest (channel-instances->manifest instances)))
     (mbegin %store-monad
       (update-profile profile manifest
+                      ;; Create a version 3 profile so that it is readable by
+                      ;; old instances of Guix.
+                      #:format-version 3
                       #:hooks %channel-profile-hooks)
 
       (return



reply via email to

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