From 2abe69696aa6a196641d3fd3f607b738d3d6c9c7 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 27 Mar 2009 04:30:02 +0000 Subject: [PATCH] Bug #227265 - Make pkgsplit() allow "versiony looking parts" in package names, for pms compliance. Also, add corresponding test cases. (trunk r13185) svn path=/main/branches/2.1.6/; revision=13214 --- pym/portage/tests/dep/test_isvalidatom.py | 5 ++++- pym/portage/versions.py | 5 ----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/pym/portage/tests/dep/test_isvalidatom.py b/pym/portage/tests/dep/test_isvalidatom.py index 5d6b4e73a..6565b96a7 100644 --- a/pym/portage/tests/dep/test_isvalidatom.py +++ b/pym/portage/tests/dep/test_isvalidatom.py @@ -61,7 +61,10 @@ class IsValidAtom(TestCase): ( "null/portage*:0", False ), ( ">=null/portage-2.1", True ), ( "~null/portage-2.1", True ), - ( "=null/portage-2.1*", True ),] + ( "=null/portage-2.1*", True ), + ( "=foo/bar-123-1", True ), + ( "=foo/bar-123-1-r1", True ), + ] for test in tests: if test[1]: diff --git a/pym/portage/versions.py b/pym/portage/versions.py index 08e4a3744..a5f4c6c1a 100644 --- a/pym/portage/versions.py +++ b/pym/portage/versions.py @@ -247,11 +247,6 @@ def pkgsplit(mypkg,silent=1): pkgcache[mypkg]=None return None else: - for x in myparts[:verPos]: - if ververify(x): - pkgcache[mypkg]=None - return None - #names can't have versiony looking parts myval=("-".join(myparts[:verPos]),myparts[verPos],revision) pkgcache[mypkg]=myval return myval -- 2.26.2