diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-11-20 23:51:26 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-11-20 23:51:26 +0100 |
commit | edae5b3d50692c25e29fe65fdc14ae3ccdce884d (patch) | |
tree | ec257af3a922fd96bda8b8b16c00c8d0beaf445a /guix/packages.scm | |
parent | 1dba64079c5aaa1fb40e4b1d989f1f06efd6cb63 (diff) | |
parent | e3aaefe71bd26daf6fdbfd0634f68a90985e059b (diff) | |
download | gnu-guix-edae5b3d50692c25e29fe65fdc14ae3ccdce884d.tar gnu-guix-edae5b3d50692c25e29fe65fdc14ae3ccdce884d.tar.gz |
Merge branch 'master' into core-updates
Conflicts:
guix/packages.scm
Diffstat (limited to 'guix/packages.scm')
-rw-r--r-- | guix/packages.scm | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/guix/packages.scm b/guix/packages.scm index 9a2f08d862..c1247b71ac 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -224,24 +224,26 @@ corresponds to the arguments expected by `set-path-environment-variable'." (($ <location> file line column) (catch 'system (lambda () - (call-with-input-file (search-path %load-path file) - (lambda (port) - (goto port line column) - (match (read port) - (('package inits ...) - (let ((field (assoc field inits))) - (match field - ((_ value) - ;; Put the `or' here, and not in the first argument of - ;; `and=>', to work around a compiler bug in 2.0.5. - (or (and=> (source-properties value) - source-properties->location) - (and=> (source-properties field) - source-properties->location))) - (_ - #f)))) - (_ - #f))))) + ;; In general we want to keep relative file names for modules. + (with-fluids ((%file-port-name-canonicalization 'relative)) + (call-with-input-file (search-path %load-path file) + (lambda (port) + (goto port line column) + (match (read port) + (('package inits ...) + (let ((field (assoc field inits))) + (match field + ((_ value) + ;; Put the `or' here, and not in the first argument of + ;; `and=>', to work around a compiler bug in 2.0.5. + (or (and=> (source-properties value) + source-properties->location) + (and=> (source-properties field) + source-properties->location))) + (_ + #f)))) + (_ + #f)))))) (lambda _ #f))) (_ #f))) @@ -419,7 +421,7 @@ IMPORTED-MODULES specify modules to use/import for use by SNIPPET." #:modules modules #:imported-modules modules #:guile-for-build guile))) - ((and (? string?) (? store-path?) file) + ((and (? string?) (? direct-store-path?) file) file) ((? string? file) (add-to-store store (basename file) #t "sha256" file)))) |