diff options
author | Paul Varner <fuzzyray@gentoo.org> | 2016-08-16 11:03:21 -0500 |
---|---|---|
committer | Paul Varner <fuzzyray@gentoo.org> | 2016-08-16 11:03:21 -0500 |
commit | 8b40fded4ca1ecc94ed1391acb3a7e16218d4779 (patch) | |
tree | c4a0e9607b45c56152d33ae16a143187fed01168 /pym/gentoolkit/cpv.py | |
parent | revdep-ebuild: Fix unicode argument expected error (diff) | |
download | gentoolkit-8b40fded4ca1ecc94ed1391acb3a7e16218d4779.tar.gz gentoolkit-8b40fded4ca1ecc94ed1391acb3a7e16218d4779.tar.bz2 gentoolkit-8b40fded4ca1ecc94ed1391acb3a7e16218d4779.zip |
gentoolkit: Fix to allow a package name to end with a hyphen
From PMS: "3.1.2 Package Names
A package name may contain any of the characters [A-Za-z0-9+_-]. It must
not begin with a hyphen or a plus sign, and must not end in a hyphen
followed by anything matching the version syntax described in section
3.2."
This fixes the validation in cpv.py to allow a package name to end with
a hyphen as long as what follows does not match a version.
X-Gentoo-bug: 586986
X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=586986
Diffstat (limited to 'pym/gentoolkit/cpv.py')
-rw-r--r-- | pym/gentoolkit/cpv.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pym/gentoolkit/cpv.py b/pym/gentoolkit/cpv.py index f1e3241..6e272f1 100644 --- a/pym/gentoolkit/cpv.py +++ b/pym/gentoolkit/cpv.py @@ -243,7 +243,7 @@ def isvalid_pkg_name(chunks): mf = _pkg_re.match if not all(not s or mf(s) for s in chunks): return False - if not chunks[-1] or (len(chunks) > 1 and chunks[-1].isdigit()): + if len(chunks) > 1 and chunks[-1].isdigit(): # not allowed. return False return True |