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