diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2014-07-18 11:07:33 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2014-07-18 20:40:51 +0200 |
| commit | a52127c052974abeb88daf300d3a173e5e25333a (patch) | |
| tree | cc5d655be5c739e3fae5f6b724fbc336813012dd | |
| parent | 689142cd759457f375230a00dc719ddc00dc2fe4 (diff) | |
guix system: init: Always use /var/guix as the target state directory.
Fixes <http://bugs.gnu.org/18049>.
Reported by Marek Benc <merkur32@gmail.com>.
* guix/scripts/system.scm (copy-closure): Pass #:state-directory to
'register-path'.
| -rw-r--r-- | guix/scripts/system.scm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 10bf7e0c967..66ad9192c14 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm | |||
| @@ -99,14 +99,19 @@ | |||
| 99 | #:key (log-port (current-error-port))) | 99 | #:key (log-port (current-error-port))) |
| 100 | "Copy ITEM to the store under root directory TARGET and register it." | 100 | "Copy ITEM to the store under root directory TARGET and register it." |
| 101 | (mlet* %store-monad ((refs (references* item))) | 101 | (mlet* %store-monad ((refs (references* item))) |
| 102 | (let ((dest (string-append target item))) | 102 | (let ((dest (string-append target item)) |
| 103 | (state (string-append target "/var/guix"))) | ||
| 103 | (format log-port "copying '~a'...~%" item) | 104 | (format log-port "copying '~a'...~%" item) |
| 104 | (copy-recursively item dest | 105 | (copy-recursively item dest |
| 105 | #:log (%make-void-port "w")) | 106 | #:log (%make-void-port "w")) |
| 106 | 107 | ||
| 107 | ;; Register ITEM; as a side-effect, it resets timestamps, etc. | 108 | ;; Register ITEM; as a side-effect, it resets timestamps, etc. |
| 109 | ;; Explicitly use "TARGET/var/guix" as the state directory, to avoid | ||
| 110 | ;; reproducing the user's current settings; see | ||
| 111 | ;; <http://bugs.gnu.org/18049>. | ||
| 108 | (unless (register-path item | 112 | (unless (register-path item |
| 109 | #:prefix target | 113 | #:prefix target |
| 114 | #:state-directory state | ||
| 110 | #:references refs) | 115 | #:references refs) |
| 111 | (leave (_ "failed to register '~a' under '~a'~%") | 116 | (leave (_ "failed to register '~a' under '~a'~%") |
| 112 | item target)) | 117 | item target)) |
