diff options
Diffstat (limited to 'gnu/build/install.scm')
-rw-r--r-- | gnu/build/install.scm | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/gnu/build/install.scm b/gnu/build/install.scm index 5c2b35632d..5cb6055a0c 100644 --- a/gnu/build/install.scm +++ b/gnu/build/install.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com> ;;; ;;; This file is part of GNU Guix. @@ -24,6 +24,7 @@ #:use-module (ice-9 match) #:export (install-grub install-grub-config + evaluate-populate-directive populate-root-file-system reset-timestamps register-closure @@ -192,13 +193,16 @@ rest of STORE." (define* (populate-single-profile-directory directory #:key profile closure - deduplicate?) + deduplicate? + register?) "Populate DIRECTORY with a store containing PROFILE, whose closure is given in the file called CLOSURE (as generated by #:references-graphs.) DIRECTORY is initialized to contain a single profile under /root pointing to PROFILE. -DEDUPLICATE? determines whether to deduplicate files in the store. +When REGISTER? is true, initialize DIRECTORY/var/guix/db to reflect the +contents of the store; DEDUPLICATE? determines whether to deduplicate files in +the store. -This is used to create the self-contained Guix tarball." +This is used to create the self-contained tarballs with 'guix pack'." (define (scope file) (string-append directory "/" file)) @@ -213,14 +217,16 @@ This is used to create the self-contained Guix tarball." ;; Populate the store. (populate-store (list closure) directory) - (register-closure (canonicalize-path directory) closure - #:deduplicate? deduplicate?) - - ;; XXX: 'guix-register' registers profiles as GC roots but the symlink - ;; target uses $TMPDIR. Fix that. - (delete-file (scope "/var/guix/gcroots/profiles")) - (symlink* "/var/guix/profiles" - "/var/guix/gcroots/profiles") + + (when register? + (register-closure (canonicalize-path directory) closure + #:deduplicate? deduplicate?) + + ;; XXX: 'guix-register' registers profiles as GC roots but the symlink + ;; target uses $TMPDIR. Fix that. + (delete-file (scope "/var/guix/gcroots/profiles")) + (symlink* "/var/guix/profiles" + "/var/guix/gcroots/profiles")) ;; Make root's profile, which makes it a GC root. (mkdir-p* %root-profile) |