Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 789303 - app-portage/g-sorcery with app-portage/gs-elpa frontend allows invalid names for ebuild files
Summary: app-portage/g-sorcery with app-portage/gs-elpa frontend allows invalid names ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Overlays (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Layman Overlay Manager project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-10 13:01 UTC by Rainer W
Modified: 2021-05-10 15:09 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer W 2021-05-10 13:01:06 UTC
Overlay "melpa-stable" contains several packages featuring invalid ebuild file names, as in

   /var/lib/layman/melpa-stable/app-emacs/mozc/mozc-2018.-4.2.-4.26.ebuild

These packages are not installable, so g-sourcery should either drop them or
provide valid ebuild file names (I strongly hope for the latter :-).

To get the complete list of invalid ebuild file names execute

   # layman -a melpa-stable
   # /usr/bin/eclean
Comment 1 Ulrich Müller gentoo-dev 2021-05-10 15:09:56 UTC
The invalid version numbers should have been fixed in the gs-elpa frontend, app-portage/gs-elpa-0.2.1. As I wrote in the commit message below, there is no easy way to map these versions to a Gentoo version string, while at the same time preserving the location of the distfile. (It may not even exist upstream, e.g., for your example https://stable.melpa.org/#/mozc the "Download" link doesn't work.)

So for now we simply skip packages with negative versions:

https://gitweb.gentoo.org/proj/gs-elpa.git/commit/?id=3ecda98fcd590fed73966df7f7f1fca86de019a7

commit 3ecda98fcd590fed73966df7f7f1fca86de019a7
Author: Ulrich Müller <ulm@gentoo.org>
Date:   Wed May 5 18:14:14 2021 +0200

    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>