GNU bug report logs - #37556
gpg "-unknown" version string

Previous Next

Package: emacs;

Reported by: Juanma Barranquero <lekktu <at> gmail.com>

Date: Sun, 29 Sep 2019 23:01:01 UTC

Severity: normal

Tags: fixed, patch

Found in version 27.0.50

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #23 received at 37556 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: 37556 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#37556: gpg "-unknown" version string
Date: Mon, 30 Sep 2019 16:04:09 +0200
Juanma Barranquero <lekktu <at> gmail.com> writes:

> On Mon, Sep 30, 2019 at 10:46 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>> You are saying that -unknown is in this case the same as -alpha.
>
> In fact, Lars gave it priority -4, so like a snapshot.
>
>> My problem is how to be sure this is the case everywhere where -unknown
>> could be used.
>
> True, but if -unknown is really uncommon, we can deal with the problems as
> they are reported (if ever).

Looking at the code, just keeping this in epg* is really awkward,
because we compare the version strings afterwards (in other contexts)
with version<=, which will then fail.

So I think this patch is needed to fix the epg problem.  But I'm not
confident that it won't change behaviour for other users of these
version functions.

On the other hand, we have been adding to this alist over the years
without anything blowing up (that I know of), so perhaps it is safe-ish?
If it turns out to be a problem, it's easy enough to back out (but then
I don't really know how to fix the original epg problem in a sensible
manner).

diff --git a/lisp/subr.el b/lisp/subr.el
index 45b99a82d2..efe530cd54 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -5285,6 +5285,8 @@ version-regexp-alist
     ("^[-._+]$"                                           . -4)
     ;; treat "1.2.3-CVS" as snapshot release
     ("^[-._+ ]?\\(cvs\\|git\\|bzr\\|svn\\|hg\\|darcs\\)$" . -4)
+    ;; treat "-unknown" the same as snapshots.
+    ("^[-._+ ]?unknown$"                                  . -4)
     ("^[-._+ ]?alpha$"                                    . -3)
     ("^[-._+ ]?beta$"                                     . -2)
     ("^[-._+ ]?\\(pre\\|rc\\)$"                           . -1))


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 5 years and 279 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.