aboutsummaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-11-28 15:52:01 +0100
committerLudovic Courtès <ludo@gnu.org>2017-11-28 15:52:01 +0100
commit0a154c15a81ef80bf512a38ae8473a5bc511302b (patch)
treefdabee133e7a1abf82e7bfbdb6004f11c4a40d45 /guix
parenteef01cfe8eac8dee8ecf727e4ca459ae065e15ea (diff)
downloadgnu-guix-0a154c15a81ef80bf512a38ae8473a5bc511302b.tar
gnu-guix-0a154c15a81ef80bf512a38ae8473a5bc511302b.tar.gz
lint: Adjust file-name length test for out-of-tree file names.
* guix/scripts/lint.scm (check-patch-file-names): Adjust file-name-length calculation.
Diffstat (limited to 'guix')
-rw-r--r--guix/scripts/lint.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index 7300e55de2..1b43b0a63c 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -618,7 +618,10 @@ patch could not be found."
(max 99))
(for-each (match-lambda
((? string? patch)
- (when (> (+ margin (- (string-length patch) prefix))
+ (when (> (+ margin (if (string-prefix? %distro-directory
+ patch)
+ (- (string-length patch) prefix)
+ (string-length patch)))
max)
(emit-warning
package