summaryrefslogtreecommitdiff
path: root/guix/scripts
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2023-02-27 15:35:54 +0100
committerLudovic Courtès <ludo@gnu.org>2023-02-27 15:54:09 +0100
commitfee1d08f0dd183ef78bcb9f1534d7b9e7f1df7ac (patch)
tree34eabec6a7535b0c93767e981c5fc5477595020f /guix/scripts
parent2cf07434d8ae1751c1dc940ebeb33a586604566e (diff)
pack: Make sure tests can run without a world rebuild.
Commit 68380db4c40a2ee1156349a87254fd7b1f1a52d5 moved from 'gexp->derivation', which as a side effect, would lead tests to require a "world rebuild"--specifically, they'd have to build (default-guile). This was mitigated by 68775338a510f84e63657ab09242d79e726fa457, but that change introduced another regression. * guix/scripts/pack.scm (populate-profile-root): Define 'bootstrap?'. Pass #:guile to 'computed-file', with a value depending on 'bootstrap?'. * tests/pack.scm ("self-contained-tarball + localstatedir") ("docker-image + localstatedir", "squashfs-image + localstatedir") ("deb archive with symlinks and control files") ("rpm archive can be installed/uninstalled"): Use a <profile> record instead of a derivation.
Diffstat (limited to 'guix/scripts')
-rw-r--r--guix/scripts/pack.scm8
1 files changed, 7 insertions, 1 deletions
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
index 51a7b8f185..eb41eb5563 100644
--- a/guix/scripts/pack.scm
+++ b/guix/scripts/pack.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015, 2017-2022 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2017-2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2018 Konrad Hinsen <konrad.hinsen@fastmail.net>
;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
@@ -220,6 +220,11 @@ items, which relies on hard links."
(file-append (store-database (list profile))
"/db/db.sqlite")))
+ (define bootstrap?
+ ;; Whether a '--bootstrap' environment is needed, for testing purposes.
+ ;; XXX: Infer that from available info.
+ (and (not database) (not (profile-locales? profile))))
+
(define (import-module? module)
;; Since we don't use deduplication support in 'populate-store', don't
;; import (guix store deduplication) and its dependencies, which includes
@@ -287,6 +292,7 @@ items, which relies on hard links."
(for-each (cut evaluate-populate-directive <> #$output)
directives)))
#:local-build? #f
+ #:guile (if bootstrap? %bootstrap-guile (default-guile))
#:options (list #:references-graphs `(("profile" ,profile))
#:target target)))