aboutsummaryrefslogtreecommitdiff
path: root/guix/lint.scm
diff options
context:
space:
mode:
authorVagrant Cascadian <vagrant@debian.org>2021-11-26 12:13:45 -0800
committerVagrant Cascadian <vagrant@debian.org>2021-12-17 21:04:25 -0800
commit5f547a5c425cc99553ea713703e09a8db9f3c38b (patch)
treec0ce76b6419e20dab3b03915f606cf557381fb6f /guix/lint.scm
parent3b2b42034c42ccb1dd8845bc03dd3a8053b54aca (diff)
downloadguix-5f547a5c425cc99553ea713703e09a8db9f3c38b.tar
guix-5f547a5c425cc99553ea713703e09a8db9f3c38b.tar.gz
lint: Adjust patch file length check.
With the switch to "ustar" format in commit bdf5c16ac052af2ca9d5c3acc4acbc08fd9fdbea, the maximum file length has increased. * guix/lint.scm (check-patch-file-names): Adjust margin used to check for patch file lengths. Increase allowable patch file length appropriate to new tar format. Extend warning to explain that long files may break 'make dist'. * tests/lint.scm: Update tests accordingly.
Diffstat (limited to 'guix/lint.scm')
-rw-r--r--guix/lint.scm10
1 files changed, 7 insertions, 3 deletions
diff --git a/guix/lint.scm b/guix/lint.scm
index 403f343b6c..379bd0e80b 100644
--- a/guix/lint.scm
+++ b/guix/lint.scm
@@ -990,8 +990,12 @@ patch could not be found."
;; Check whether we're reaching tar's maximum file name length.
(let ((prefix (string-length (%distro-directory)))
- (margin (string-length "guix-2.0.0rc3-10000-1234567890/"))
- (max 99))
+ ;; Margin approximating the largest path that "make dist" might
+ ;; create, with a release candidate version, 123456 commits, and
+ ;; git commit hash abcde0.
+ (margin (string-length "guix-92.0.0rc3-123456-abcde0/"))
+ ;; Tested maximum patch file length for ustar format.
+ (max 151))
(filter-map (match-lambda
((? string? patch)
(if (> (+ margin (if (string-prefix? (%distro-directory)
@@ -1001,7 +1005,7 @@ patch could not be found."
max)
(make-warning
package
- (G_ "~a: file name is too long")
+ (G_ "~a: file name is too long, which may break 'make dist'")
(list (basename patch))
#:field 'patch-file-names)
#f))