summaryrefslogtreecommitdiff
path: root/guix/scripts/package.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-04-08 22:16:37 +0200
committerLudovic Courtès <ludo@gnu.org>2019-04-10 12:40:58 +0200
commit21b3c0ca8789c22b9b689faa01286b18f103b92e (patch)
tree293b4cd769a9c91f8ed48eda5418a9217d70ccef /guix/scripts/package.scm
parent6b11da7db29130ba95b280b406e836f92c66cc2a (diff)
guix package: Use absolute file names in search path recommendations.
Suggested by Chris Marusich. * guix/scripts/package.scm (absolutize): New procedure. (display-search-paths): Use it.
Diffstat (limited to 'guix/scripts/package.scm')
-rw-r--r--guix/scripts/package.scm10
1 files changed, 9 insertions, 1 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index b0c6a7ced7..564236988e 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -278,11 +278,19 @@ path definition to be returned."
(evaluate-search-paths search-paths profiles
getenv))))
+(define (absolutize file)
+ "Return an absolute file name equivalent to FILE, but without resolving
+symlinks like 'canonicalize-path' would do."
+ (if (string-prefix? "/" file)
+ file
+ (string-append (getcwd) "/" file)))
+
(define* (display-search-paths entries profiles
#:key (kind 'exact))
"Display the search path environment variables that may need to be set for
ENTRIES, a list of manifest entries, in the context of PROFILE."
- (let* ((profiles (map user-friendly-profile profiles))
+ (let* ((profiles (map (compose user-friendly-profile absolutize)
+ profiles))
(settings (search-path-environment-variables entries profiles
#:kind kind)))
(unless (null? settings)