emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#51985: closed (lint: Adjust patch file length check.)


From: GNU bug Tracking System
Subject: bug#51985: closed (lint: Adjust patch file length check.)
Date: Sat, 18 Dec 2021 08:28:01 +0000

Your message dated Sat, 18 Dec 2021 00:26:50 -0800
with message-id <87pmpu8gj9.fsf@ponder>
and subject line Re: bug#51985: lint: Adjust patch file length check.
has caused the debbugs.gnu.org bug report #51985,
regarding lint: Adjust patch file length check.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
51985: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=51985
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: lint: Adjust patch file length check. Date: Fri, 19 Nov 2021 13:05:58 -0800
The current guix lint check is a bit overly conservative, and reports
several results which do not in practice actually cause issues.

This patch proposes to reduce the size by two characters (leaving only
two patches on guix master that need to be adjusted), uses a version
string more like what actually might be included in a tarball built
using "make dist", and adds a comment describing what the arbitrary
string actually is supposed to represent.

This should still even leave a little wiggle-room when guix hits version
100+ and/or 1000000+ commits, by which time hopefully guix has switched
to a tarball format that doesn't have such a short arbitrary file length
limit!


live well,
  vagrant

From 6ad2050a8bbc308a328d30d4f66cb229d868b79d Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Fri, 19 Nov 2021 12:14:19 -0800
Subject: [PATCH] lint: Adjust patch file length check.

* guix/lint.scm (check-patch-file-names): Adjust margin used to check for
  patch file lengths.
---
 guix/lint.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/guix/lint.scm b/guix/lint.scm
index ac2e7b3841..39b4a2ae85 100644
--- a/guix/lint.scm
+++ b/guix/lint.scm
@@ -957,7 +957,10 @@ 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/"))
+           ;; 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-12.0.0rc3-123456-abcde0/"))
            (max    99))
        (filter-map (match-lambda
                      ((? string? patch)
-- 
2.30.2

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message --- Subject: Re: bug#51985: lint: Adjust patch file length check. Date: Sat, 18 Dec 2021 00:26:50 -0800
On 2021-11-28, Ludovic Courtès wrote:
> Vagrant Cascadian <vagrant@debian.org> skribis:
>> On 2021-11-25, Ludovic Courtès wrote:
...
>> From c0738574a3571977855d655c157ab0ea0f9be6ef Mon Sep 17 00:00:00 2001
>> From: Vagrant Cascadian <vagrant@debian.org>
>> Date: Fri, 26 Nov 2021 12:13:45 -0800
>> Subject: [PATCH] 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.
>
> [...]
>
>> +                           (G_ "~a: file name is too long which may break 
>> 'make dist'")
>
> I think you need a comma before “which”, but other than that LGTM!  :-)

Pushed as 5f547a5c425cc99553ea713703e09a8db9f3c38b with the suggested
comma, and a brief comment explaining what the magic number "151" was
about.

That should bright all the patches into compliance with lint as far as
file length goes, and should work with the ustar format for the "make
dist" produced tarballs.

Don't get too crazy with the extra ~50 characters!

live well,
  vagrant

Attachment: signature.asc
Description: PGP signature


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]