[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/04: profiles: Search for ghc conf files only if package db exists.
From: |
Eric Bavier |
Subject: |
01/04: profiles: Search for ghc conf files only if package db exists. |
Date: |
Fri, 12 Jun 2015 05:54:39 +0000 |
bavier pushed a commit to branch master
in repository guix.
commit 84de458ba8c6499dd63c6d7e7c67087df339e371
Author: Eric Bavier <address@hidden>
Date: Sat Jun 6 06:38:58 2015 -0500
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.
---
guix/profiles.scm | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/guix/profiles.scm b/guix/profiles.scm
index 28150af..33a0511 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)))