From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1630A13832E for ; Tue, 16 Aug 2016 16:05:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4393921C094; Tue, 16 Aug 2016 16:05:28 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E5C8E21C094 for ; Tue, 16 Aug 2016 16:05:27 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A2518340834 for ; Tue, 16 Aug 2016 16:05:26 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4C48C2455 for ; Tue, 16 Aug 2016 16:05:25 +0000 (UTC) From: "Paul Varner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Paul Varner" Message-ID: <1471363401.8b40fded4ca1ecc94ed1391acb3a7e16218d4779.fuzzyray@gentoo> Subject: [gentoo-commits] proj/gentoolkit:master commit in: pym/gentoolkit/ X-VCS-Repository: proj/gentoolkit X-VCS-Files: pym/gentoolkit/cpv.py X-VCS-Directories: pym/gentoolkit/ X-VCS-Committer: fuzzyray X-VCS-Committer-Name: Paul Varner X-VCS-Revision: 8b40fded4ca1ecc94ed1391acb3a7e16218d4779 X-VCS-Branch: master Date: Tue, 16 Aug 2016 16:05:25 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: f35113c3-02ee-4af7-922a-48c4bbe1addc X-Archives-Hash: d0604c226143851cca5f3d8adc5ead4d commit: 8b40fded4ca1ecc94ed1391acb3a7e16218d4779 Author: Paul Varner gentoo org> AuthorDate: Tue Aug 16 16:03:21 2016 +0000 Commit: Paul Varner gentoo org> CommitDate: Tue Aug 16 16:03:21 2016 +0000 URL: https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=8b40fded 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 pym/gentoolkit/cpv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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