diff options
author | Mark H Weaver <mhw@netris.org> | 2015-06-21 14:30:22 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2015-06-21 14:30:22 -0400 |
commit | bf76d98789a0fc6303c303beddbc1ed609f2a6ea (patch) | |
tree | 1df8db2fa06f6826a1c7a1cb1faa253df704834e /guix/gexp.scm | |
parent | fc9ff915b3cfcb494dbb5c8ab767972352fa31da (diff) | |
parent | 12b04cbee6b9c725db8a5c898b597de8e667bef0 (diff) | |
download | patches-bf76d98789a0fc6303c303beddbc1ed609f2a6ea.tar patches-bf76d98789a0fc6303c303beddbc1ed609f2a6ea.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/gexp.scm')
-rw-r--r-- | guix/gexp.scm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/guix/gexp.scm b/guix/gexp.scm index 10056e5a1f..0b5c43e2b8 100644 --- a/guix/gexp.scm +++ b/guix/gexp.scm @@ -157,7 +157,7 @@ cross-compiling.)" (recursive? local-file-recursive?)) ;Boolean (define* (local-file file #:optional (name (basename file)) - #:key (recursive? #t)) + #:key recursive?) "Return an object representing local file FILE to add to the store; this object can be used in a gexp. FILE will be added to the store under NAME--by default the base name of FILE. @@ -167,7 +167,11 @@ designates a flat file and RECURSIVE? is true, its contents are added, and its permission bits are kept. This is the declarative counterpart of the 'interned-file' monadic procedure." - (%local-file file name recursive?)) + ;; Canonicalize FILE so that if it's a symlink, it is resolved. Failing to + ;; do that, when RECURSIVE? is #t, we could end up creating a dangling + ;; symlink in the store, and when RECURSIVE? is #f 'add-to-store' would just + ;; throw an error, both of which are inconvenient. + (%local-file (canonicalize-path file) name recursive?)) (define-gexp-compiler (local-file-compiler (file local-file?) system target) ;; "Compile" FILE by adding it to the store. |