diff options
author | Ludovic Courtès <ludo@gnu.org> | 2017-03-14 15:11:03 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-03-14 17:57:27 +0100 |
commit | 6b63c43e0661406bf9e8c4c54f517744fc2ffdb3 (patch) | |
tree | 5589fbfa37c20e5210a2ee6921b2ff32b653cb7c /gnu/build | |
parent | 9b05ccfedd9945ca09103e1e9557d5988b4815d5 (diff) | |
download | gnu-guix-6b63c43e0661406bf9e8c4c54f517744fc2ffdb3.tar gnu-guix-6b63c43e0661406bf9e8c4c54f517744fc2ffdb3.tar.gz |
pack: Add '--localstatedir' option.
* guix/scripts/pack.scm (self-contained-tarball): Add #:localstatedir?
parameter and honor it.
(%options, show-help): Add '--localstatedir'.
(guix-pack): Honor it.
* gnu/build/install.scm (populate-single-profile-directory): Add
#:register? parameter and honor it.
* doc/guix.texi (Binary Installation): Use '--localstatedir' in
example.
(Invoking guix pack): Document it.
Diffstat (limited to 'gnu/build')
-rw-r--r-- | gnu/build/install.scm | 29 |
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) |