From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id B070B138010 for ; Wed, 10 Oct 2012 19:12:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1240621C014; Wed, 10 Oct 2012 19:12:39 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 81D9721C014 for ; Wed, 10 Oct 2012 19:12:39 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BC05833BF3F for ; Wed, 10 Oct 2012 19:12:38 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 22283E5436 for ; Wed, 10 Oct 2012 19:12:36 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1349896338.68288994493ee3ab56d0baf24ec3d0449330ccf5.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: man/, pym/portage/dep/, pym/portage/tests/dep/ X-VCS-Repository: proj/portage X-VCS-Files: man/portage.5 pym/portage/dep/__init__.py pym/portage/tests/dep/testAtom.py pym/portage/tests/dep/test_best_match_to_list.py X-VCS-Directories: man/ pym/portage/dep/ pym/portage/tests/dep/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 68288994493ee3ab56d0baf24ec3d0449330ccf5 X-VCS-Branch: master Date: Wed, 10 Oct 2012 19:12:36 +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: 9c1f70d8-bb05-46db-978d-20b7e1a3ea7d X-Archives-Hash: ad7f03725192c827073d2b904790ae5c commit: 68288994493ee3ab56d0baf24ec3d0449330ccf5 Author: Zac Medico gentoo org> AuthorDate: Wed Oct 10 19:12:18 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Wed Oct 10 19:12:18 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=68288994 Atom: support *_beta* wildcard, bug #437872 --- man/portage.5 | 4 +++- pym/portage/dep/__init__.py | 4 ++-- pym/portage/tests/dep/testAtom.py | 6 +++++- pym/portage/tests/dep/test_best_match_to_list.py | 6 +++++- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/man/portage.5 b/man/portage.5 index 705d0d9..12938e2 100644 --- a/man/portage.5 +++ b/man/portage.5 @@ -1,4 +1,4 @@ -.TH "PORTAGE" "5" "Sep 2012" "Portage VERSION" "Portage" +.TH "PORTAGE" "5" "Oct 2012" "Portage VERSION" "Portage" .SH NAME portage \- the heart of Gentoo .SH "DESCRIPTION" @@ -173,6 +173,8 @@ next to each other. # match anything with a version containing 9999, which can be used in # package.mask to prevent emerge --autounmask from selecting live ebuilds =*/*-*9999* +# match anything with a version containing _beta +=*/*-*_beta* # match anything from the 'sys\-apps' category sys\-apps/* # match packages named 'zlib' from any category diff --git a/pym/portage/dep/__init__.py b/pym/portage/dep/__init__.py index 6e03004..b1a46b8 100644 --- a/pym/portage/dep/__init__.py +++ b/pym/portage/dep/__init__.py @@ -143,7 +143,7 @@ def _get_atom_wildcard_re(eapi_attrs): atom_re = re.compile(r'((?P(' + _extended_cat + r')/(' + pkg_re + r'))' + \ - '|(?P=((' + _extended_cat + r')/(' + pkg_re + r'))-(?P\*\d+\*)))' + \ + '|(?P=((' + _extended_cat + r')/(' + pkg_re + r'))-(?P\*\w+\*)))' + \ '(:(?P' + _slot_loose + r'))?(' + _repo_separator + r'(?P' + _repo_name + r'))?$', re.UNICODE) @@ -2134,7 +2134,7 @@ def match_from_list(mydep, candidate_list): candidate_list = mylist mylist = [] - # Currently, only \*\d+\* is supported. + # Currently, only \*\w+\* is supported. ver = mydep.version[1:-1] for x in candidate_list: diff --git a/pym/portage/tests/dep/testAtom.py b/pym/portage/tests/dep/testAtom.py index 094538d..948166d 100644 --- a/pym/portage/tests/dep/testAtom.py +++ b/pym/portage/tests/dep/testAtom.py @@ -1,4 +1,4 @@ -# Copyright 2006, 2010 Gentoo Foundation +# Copyright 2006-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from portage.tests import TestCase @@ -24,6 +24,10 @@ class TestAtom(TestCase): ('=*', '*/*', '*9999*', None, None, None), True, False ), ( "=*/*-*9999*:0::repo_name", ('=*', '*/*', '*9999*', '0', None, 'repo_name'), True, True ), + ( "=*/*-*_beta*", + ('=*', '*/*', '*_beta*', None, None, None), True, False ), + ( "=*/*-*_beta*:0::repo_name", + ('=*', '*/*', '*_beta*', '0', None, 'repo_name'), True, True ), ( "sys-apps/*", (None, 'sys-apps/*', None, None, None, None), True, False ), ( "*/portage", diff --git a/pym/portage/tests/dep/test_best_match_to_list.py b/pym/portage/tests/dep/test_best_match_to_list.py index 8a14038..0ea8342 100644 --- a/pym/portage/tests/dep/test_best_match_to_list.py +++ b/pym/portage/tests/dep/test_best_match_to_list.py @@ -1,5 +1,5 @@ # test_best_match_to_list.py -- Portage Unit Testing Functionality -# Copyright 2010-2011 Gentoo Foundation +# Copyright 2010-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from itertools import permutations @@ -40,6 +40,10 @@ class Test_best_match_to_list(TestCase): [Atom("=dev-libs/A-1:0"), Atom("dev-libs/*", allow_wildcard=True)], True), ("dev-libs/A-4.9999-r1", [Atom("dev-libs/*", allow_wildcard=True), Atom("=*/*-*9999*", allow_wildcard=True)], \ [Atom("=*/*-*9999*", allow_wildcard=True), Atom("dev-libs/*", allow_wildcard=True)], True), + ("dev-libs/A-4_beta-r1", [Atom("dev-libs/*", allow_wildcard=True), Atom("=*/*-*_beta*", allow_wildcard=True)], \ + [Atom("=*/*-*_beta*", allow_wildcard=True), Atom("dev-libs/*", allow_wildcard=True)], True), + ("dev-libs/A-4_beta1-r1", [Atom("dev-libs/*", allow_wildcard=True), Atom("=*/*-*_beta*", allow_wildcard=True)], \ + [Atom("=*/*-*_beta*", allow_wildcard=True), Atom("dev-libs/*", allow_wildcard=True)], True), ("dev-libs/A-1:0", [Atom("dev-*/*", allow_wildcard=True), Atom("dev-*/*:0", allow_wildcard=True),\ Atom("dev-libs/A"), Atom("<=dev-libs/A-2"), Atom("dev-libs/A:0"), \ Atom("=dev-libs/A-1*"), Atom("~dev-libs/A-1"), Atom("=dev-libs/A-1")], \