aboutsummaryrefslogtreecommitdiff
path: root/gnu/build
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/build')
-rw-r--r--gnu/build/install.scm29
1 files changed, 17 insertions, 12 deletions
diff --git a/gnu/build/install.scm b/gnu/build/install.scm
index 5c2b35632d..11f107d63c 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.
@@ -192,13 +192,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 +216,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)