From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: man/, pym/portage/dep/, pym/portage/tests/dep/
Date: Wed, 10 Oct 2012 19:12:36 +0000 (UTC) [thread overview]
Message-ID: <1349896338.68288994493ee3ab56d0baf24ec3d0449330ccf5.zmedico@gentoo> (raw)
commit: 68288994493ee3ab56d0baf24ec3d0449330ccf5
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 10 19:12:18 2012 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> 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<simple>(' +
_extended_cat + r')/(' + pkg_re + r'))' + \
- '|(?P<star>=((' + _extended_cat + r')/(' + pkg_re + r'))-(?P<version>\*\d+\*)))' + \
+ '|(?P<star>=((' + _extended_cat + r')/(' + pkg_re + r'))-(?P<version>\*\w+\*)))' + \
'(:(?P<slot>' + _slot_loose + r'))?(' +
_repo_separator + r'(?P<repo>' + _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")], \
next reply other threads:[~2012-10-10 19:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-10 19:12 Zac Medico [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-07-18 19:55 [gentoo-commits] proj/portage:master commit in: man/, pym/portage/dep/, pym/portage/tests/dep/ Zac Medico
2011-02-07 22:07 Zac Medico
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1349896338.68288994493ee3ab56d0baf24ec3d0449330ccf5.zmedico@gentoo \
--to=zmedico@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox