summary refs log tree commit diff
diff options
context:
space:
mode:
-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