summaryrefslogtreecommitdiff
path: root/guix/profiles.scm
diff options
context:
space:
mode:
authorEric Bavier <bavier@member.fsf.org>2015-06-06 06:38:58 -0500
committerEric Bavier <bavier@member.fsf.org>2015-06-11 18:55:48 -0500
commit84de458ba8c6499dd63c6d7e7c67087df339e371 (patch)
tree587080cccb92c721514b2e9caf8a03fd236f1787 /guix/profiles.scm
parentdc7b1817f6f75fa7e69b7675c313095cc1fddc63 (diff)
profiles: Search for ghc conf files only if package db exists.
This avoids having 'find-files' report warnings about searching in non-existent directories. * guix/profiles.scm (ghc-package-cache-file)[conf-files]: Only search for *.conf files if the search directory exists.
Diffstat (limited to 'guix/profiles.scm')
-rw-r--r--guix/profiles.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/guix/profiles.scm b/guix/profiles.scm
index 28150affb6..33a0511a3a 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -500,7 +500,10 @@ entries of MANIFEST, or #f if MANIFEST does not have any GHC packages."
(string-append #$output "/" db-subdir))
(define (conf-files top)
- (find-files (string-append top "/" db-subdir) "\\.conf$"))
+ (let ((db (string-append top "/" db-subdir)))
+ (if (file-exists? db)
+ (find-files db "\\.conf$")
+ '())))
(define (copy-conf-file conf)
(let ((base (basename conf)))