Hi John, John Zaitseff <j.zaits...@zap.org.au> writes:
> 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.zaits...@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))) > 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]. [1] https://www.gnu.org/software/emacs/manual/html_node/emacs/Regexps.html [2] https://salsa.debian.org/emacsen-team/dh-elpa/-/compare/master...git-version-regex-fix?from_project_id=18920 -- Regards, Xiyue Deng
signature.asc
Description: PGP signature