Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gs-elpa:master commit in: gs_elpa/
Date: Wed, 05 May 2021 16:47:44
Message-Id: 1620231254.3ecda98fcd590fed73966df7f7f1fca86de019a7.ulm@gentoo
1 commit: 3ecda98fcd590fed73966df7f7f1fca86de019a7
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Wed May 5 16:14:14 2021 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Wed May 5 16:14:14 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/gs-elpa.git/commit/?id=3ecda98f
7
8 gs_elpa/elpa_db.py: Check version numbers for sanity
9
10 Packages with negative version numbers have been seen in melpa-stable.
11 These appear to be the result of mapping non-numeric versions,
12 which are defined in version-regexp-alist as follows (Emacs 27.2):
13 (("^[-._+ ]?snapshot$" . -4)
14 ("^[-._+]$" . -4)
15 ("^[-._+ ]?\\(cvs\\|git\\|bzr\\|svn\\|hg\\|darcs\\)$" . -4)
16 ("^[-._+ ]?unknown$" . -4)
17 ("^[-._+ ]?alpha$" . -3)
18 ("^[-._+ ]?beta$" . -2)
19 ("^[-._+ ]?\\(pre\\|rc\\)$" . -1))
20
21 We could try to map them to Gentoo _alpha, _beta, etc. suffixes, but
22 it would require more effort to determine the name of the distfile
23 (and record it in the ebuild). Therefore skip these packages for now.
24
25 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
26
27 gs_elpa/elpa_db.py | 5 +++++
28 1 file changed, 5 insertions(+)
29
30 diff --git a/gs_elpa/elpa_db.py b/gs_elpa/elpa_db.py
31 index ad0e374..f307c87 100644
32 --- a/gs_elpa/elpa_db.py
33 +++ b/gs_elpa/elpa_db.py
34 @@ -88,6 +88,11 @@ class ElpaDBGenerator(DBGenerator):
35 if self.in_config([common_config, config], "exclude", realname):
36 continue
37
38 + # Version numbers with negative elements have been seen
39 + # in melpa-stable. Skip these packages for now.
40 + if not all(i >= 0 for i in desc[INFO_VERSION]):
41 + continue
42 +
43 pkg = Package("app-emacs", realname,
44 '.'.join(map(str, desc[INFO_VERSION])))
45 source_type = desc[INFO_SRC_TYPE].value()