diff options
author | 2021-05-05 18:14:14 +0200 | |
---|---|---|
committer | 2021-05-05 18:14:14 +0200 | |
commit | 3ecda98fcd590fed73966df7f7f1fca86de019a7 (patch) | |
tree | 0b60671a9d0db5a01e103c6b44278743492192eb | |
parent | gs_elpa/ebuild.py: Generate ebuilds for EAPI 7 (diff) | |
download | gs-elpa-3ecda98fcd590fed73966df7f7f1fca86de019a7.tar.gz gs-elpa-3ecda98fcd590fed73966df7f7f1fca86de019a7.tar.bz2 gs-elpa-3ecda98fcd590fed73966df7f7f1fca86de019a7.zip |
gs_elpa/elpa_db.py: Check version numbers for sanity
Packages with negative version numbers have been seen in melpa-stable.
These appear to be the result of mapping non-numeric versions,
which are defined in version-regexp-alist as follows (Emacs 27.2):
(("^[-._+ ]?snapshot$" . -4)
("^[-._+]$" . -4)
("^[-._+ ]?\\(cvs\\|git\\|bzr\\|svn\\|hg\\|darcs\\)$" . -4)
("^[-._+ ]?unknown$" . -4)
("^[-._+ ]?alpha$" . -3)
("^[-._+ ]?beta$" . -2)
("^[-._+ ]?\\(pre\\|rc\\)$" . -1))
We could try to map them to Gentoo _alpha, _beta, etc. suffixes, but
it would require more effort to determine the name of the distfile
(and record it in the ebuild). Therefore skip these packages for now.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
-rw-r--r-- | gs_elpa/elpa_db.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gs_elpa/elpa_db.py b/gs_elpa/elpa_db.py index ad0e374..f307c87 100644 --- a/gs_elpa/elpa_db.py +++ b/gs_elpa/elpa_db.py @@ -88,6 +88,11 @@ class ElpaDBGenerator(DBGenerator): if self.in_config([common_config, config], "exclude", realname): continue + # Version numbers with negative elements have been seen + # in melpa-stable. Skip these packages for now. + if not all(i >= 0 for i in desc[INFO_VERSION]): + continue + pkg = Package("app-emacs", realname, '.'.join(map(str, desc[INFO_VERSION]))) source_type = desc[INFO_SRC_TYPE].value() |