summaryrefslogtreecommitdiff
path: root/guix/build/utils.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-04-05 15:31:55 +0200
committerLudovic Courtès <ludo@gnu.org>2015-04-05 15:40:48 +0200
commitdacd5d2ca7411251570cf486febcb2cde3ed021f (patch)
treee3d867965a5fc6e950c13e80f673abee22816638 /guix/build/utils.scm
parent1d386b2d711fee2dc618358ac51b1865e3f85433 (diff)
downloadguix-patches-dacd5d2ca7411251570cf486febcb2cde3ed021f.tar
guix-patches-dacd5d2ca7411251570cf486febcb2cde3ed021f.tar.gz
gremlin: Ignore non-store file names in RUNPATH and warn about them.
* guix/build/gremlin.scm (validate-needed-in-runpath)[runpath]: Add (filter absolute-file-name? ...). Emit a warning when RUNPATH file names that do not match 'store-file-name?'. Change format of error message to begin with file name. * guix/build/utils.scm (store-file-name?): New procedure.
Diffstat (limited to 'guix/build/utils.scm')
-rw-r--r--guix/build/utils.scm5
1 files changed, 5 insertions, 0 deletions
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index 5d229b5f83..fbd5d54da5 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -32,6 +32,7 @@
#:re-export (alist-cons
alist-delete)
#:export (%store-directory
+ store-file-name?
parallel-job-count
directory-exists?
@@ -81,6 +82,10 @@
(or (getenv "NIX_STORE")
"/gnu/store"))
+(define (store-file-name? file)
+ "Return true if FILE is in the store."
+ (string-prefix? (%store-directory) file))
+
(define parallel-job-count
;; Number of processes to be passed next to GNU Make's `-j' argument.
(make-parameter