[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
48/66: search-paths: 'evaluate-search-paths' now returns spec/value pair
From: |
Manolis Fragkiskos Ragkousis |
Subject: |
48/66: search-paths: 'evaluate-search-paths' now returns spec/value pairs. |
Date: |
Thu, 21 May 2015 12:52:06 +0000 |
phant0mas pushed a commit to branch wip-hurd
in repository guix.
commit 6da58200f0ea750b58a6d6ae9691ee50631c0c3d
Author: Ludovic Courtès <address@hidden>
Date: Mon May 4 22:27:11 2015 +0200
search-paths: 'evaluate-search-paths' now returns spec/value pairs.
* guix/search-paths.scm (evaluate-search-paths): Return
specification/value pairs instead of variable/value pairs.
* guix/scripts/package.scm (search-path-environment-variables): Adjust
accordingly. Pass #:separator to 'environment-variable-definition'.
---
guix/scripts/package.scm | 8 ++++++--
guix/search-paths.scm | 9 +++++----
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index 9e433dd..7f53af7 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -383,8 +383,12 @@ current settings and report only settings not already
effective."
(let ((search-paths (delete-duplicates
(append-map manifest-entry-search-paths entries))))
(filter-map (match-lambda
- ((variable . value)
- (environment-variable-definition variable value)))
+ ((spec . value)
+ (let ((variable (search-path-specification-variable spec))
+ (sep (search-path-specification-separator spec)))
+ ;; TODO: Offer the choice between exact/prefix/suffix.
+ (environment-variable-definition variable value
+ #:separator sep))))
(evaluate-search-paths search-paths profile getenv))))
(define (display-search-paths entries profile)
diff --git a/guix/search-paths.scm b/guix/search-paths.scm
index 7957c88..154e508 100644
--- a/guix/search-paths.scm
+++ b/guix/search-paths.scm
@@ -117,12 +117,13 @@ like `string-tokenize', but SEPARATOR is a string."
(define* (evaluate-search-paths search-paths directory
#:optional (getenv (const #f)))
"Evaluate SEARCH-PATHS, a list of search-path specifications, for DIRECTORY,
-and return a list of variable/value pairs. Use GETENV to determine the
+and return a list of specification/value pairs. Use GETENV to determine the
current settings and report only settings not already effective."
(define search-path-definition
(match-lambda
- (($ <search-path-specification> variable files separator
- type pattern)
+ ((and spec
+ ($ <search-path-specification> variable files separator
+ type pattern))
(let* ((values (or (and=> (getenv variable)
(cut string-tokenize* <> separator))
'()))
@@ -141,7 +142,7 @@ current settings and report only settings not already
effective."
#:pattern pattern))))
(if (every (cut member <> values) path)
#f ;VARIABLE is already set appropriately
- (cons variable (string-join path separator)))))))
+ (cons spec (string-join path separator)))))))
(filter-map search-path-definition search-paths))
- 39/66: gnu: Add python-sympy., (continued)
- 39/66: gnu: Add python-sympy., Manolis Fragkiskos Ragkousis, 2015/05/21
- 35/66: gnu: bamtools: Set rpath via LDFLAGS., Manolis Fragkiskos Ragkousis, 2015/05/21
- 33/66: gnu: Add samtools-0.1.19., Manolis Fragkiskos Ragkousis, 2015/05/21
- 31/66: gnu: samtools: Remove patch-makefile-curses phase., Manolis Fragkiskos Ragkousis, 2015/05/21
- 36/66: doc: Clarify installation from the binary tarball., Manolis Fragkiskos Ragkousis, 2015/05/21
- 43/66: substitute: Increase TTL from 24h to 36h., Manolis Fragkiskos Ragkousis, 2015/05/21
- 40/66: gnu: curl: Update to 7.42.1., Manolis Fragkiskos Ragkousis, 2015/05/21
- 44/66: gnu: Add markdown., Manolis Fragkiskos Ragkousis, 2015/05/21
- 47/66: search-paths: Add 'environment-variable-definition'., Manolis Fragkiskos Ragkousis, 2015/05/21
- 49/66: profiles: Use a &message error condition instead of 'error'., Manolis Fragkiskos Ragkousis, 2015/05/21
- 48/66: search-paths: 'evaluate-search-paths' now returns spec/value pairs.,
Manolis Fragkiskos Ragkousis <=
- 42/66: gnu: Add libwpg., Manolis Fragkiskos Ragkousis, 2015/05/21
- 41/66: guix: build: Fix indentation for --sources in help output., Manolis Fragkiskos Ragkousis, 2015/05/21
- 46/66: search-paths: Add 'evaluate-search-paths', from (guix scripts package)., Manolis Fragkiskos Ragkousis, 2015/05/21
- 45/66: Move search path specifications to (guix search-paths)., Manolis Fragkiskos Ragkousis, 2015/05/21
- 51/66: gnu: Add soil., Manolis Fragkiskos Ragkousis, 2015/05/21
- 50/66: records: Make 'make-syntactic-constructor' available at load/eval/expand., Manolis Fragkiskos Ragkousis, 2015/05/21
- 56/66: gnu: vcftools: Remove "-m64" from CFLAGS., Manolis Fragkiskos Ragkousis, 2015/05/21
- 53/66: gnu: Add bluez., Manolis Fragkiskos Ragkousis, 2015/05/21
- 55/66: gnu: fltk: Fix undefined symbol errors for shared libraries., Manolis Fragkiskos Ragkousis, 2015/05/21
- 60/66: gnu: bootstrap: Add the location of where ld.so is located on Hurd systems., Manolis Fragkiskos Ragkousis, 2015/05/21