• Bug#1104316: Minor bug in dh-elpa.el regex

    From John Zaitseff@21:1/5 to All on Mon Apr 28 22:30:01 2025
    XPost: linux.debian.maint.emacsen

    Package: dh-elpa-helper
    Version: 2.1.9

    I believe I've found a minor bug in dh-elpa.el: the regex for
    handling "git" version strings uses "[+-~]git.*$", which covers most
    of ASCII for the first character. Shouldn't that read "[-+~]git.*$"
    instead, to match only "-", "+" and "~"?

    I'm attaching a patch just in case this is indeed an problem.

    Yours truly,

    John Zaitseff

    --
    John Zaitseff ╭───╮ Email: J.Zaitseff@zap.org.au
    The ZAP Group │ Z │ GnuPG: 0x0D254111C4EE569B
    Australia Inc. ╰───╯ https://www.zap.org.au/~john/

    diff -ruNa dh-elpa-2.1.9.orig/dh-elpa.el dh-elpa-2.1.9/dh-elpa.el
    --- dh-elpa-2.1.9.orig/dh-elpa.el 2025-03-14 17:53:25.000000000 +1100
    +++ dh-elpa-2.1.9/dh-elpa.el 2025-04-29 05:57:02.416197152 +1000
    @@ -157,7 +157,7 @@
    such a case."
    (when version
    (let* ((version (replace-regexp-in-string "~bpo.*$" "" version))
    - (version (replace-regexp-in-string "[+-~]git.*$" "-git" version))
    + (version (replace-regexp-in-string "[-+~]git.*$" "-git" version))
    (version (replace-regexp-in-string "~" "-" version)))
    version)))

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Zaitseff@21:1/5 to All on Tue Apr 29 01:00:01 2025
    XPost: linux.debian.maint.emacsen

    Hi, Xiyue Deng,

    I believe I've found a minor bug in dh-elpa.el [...]

    Thanks for the report! This is indeed an issue. Though according
    to Emacs regexp specs, to include "-" it should be the last
    character in the brackets[1]. A proposed fix is in pushed to a
    branch and the diff can be found here[2].

    Thank you for the quick reply and fix! I do note that the Emacs
    manual states "... tho you can also put [the hyphen] first or after
    a range." :-) But that's just a matter of style: first or last, at
    least it will be fixed. Thanks!

    Yours truly,

    John Zaitseff

    --
    John Zaitseff ╭───╮ Email: J.Zaitseff@zap.org.au
    The ZAP Group │ Z │ GnuPG: 0x0D254111C4EE569B
    Australia Inc. ╰───╯ https://www.zap.org.au/~john/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sean Whitton@21:1/5 to All on Tue Apr 29 02:50:01 2025
    XPost: linux.debian.maint.emacsen

    Hello,

    Thanks both. Xiyue, please merge the fix to master.

    --
    Sean Whitton

    --=-=-Content-Type: application/pgp-signature; name="signature.asc"

    -----BEGIN PGP SIGNATURE-----

    iQJNBAEBCgA3FiEEm5FwB64DDjbk/CSLaVt65L8GYkAFAmgQILkZHHNwd2hpdHRv bkBzcHdoaXR0b24ubmFtZQAKCRBpW3rkvwZiQCqXD/44wWMDpE+hGoxfbO3Ndzh2 9bepAbil8yAu9zhWPpaX/KuqwS38A47p6W0ZLzJFm6ZNDzQHloMPkAC5lN1JeqTC eXs42xzttKFBXhWEKWvuTBdC6SYU+H+RanNNFSjVuobaHF0DCmp7ruohgsV4sVrD axlWItbIAfG7tsQmw+InCRgy7UT8qKLAR4ur35Y29MP5fST1kzneWINO/ZUvp5xV ZDF6ofx7FVkgQc+wdB1RprDcIvFl+EoYQJzlIvznNyVjZFxJggVMG2EZ402JSMpG XCi441dqs0+3X8B8lA8br9BzM9GCBK7wWy6/52VA6Ni6CpghlfHe4J1YzlPwLu9x zV4kN/1xBJmCXgh1c0JFHHY212nkzwJU35Gm00ueEPurcDPBMhPLyVcJzXXZRVEH ZyAAoSzUMaZ3O8t5Lk522oO9gDWo3N6+EDqMl4hc56TAYZYogwNZaTVoi7FKhqGb HbD2KW3z31pYtexH8uV7SY77hNSCUPYSz6pdEUC/RtKTv1cXgMx2VE5+pq9VZhua DA2YUPK6MgPsPQCQU/+TyY1xnk5a2TH1/ychqinRkxIPacK6086j7pqozJiU6Isv v5AtMk8NZ/bvyXHA/mgnUF4bipmO1Ue6c70PMfiRRpDsYtepOhrsuc4FjM+ujd9+ h04TV5WmV5apy0kM+jK8sg==RE5V
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Us