From: Zac Medico Date: Fri, 27 Mar 2009 04:30:02 +0000 (-0000) Subject: Bug #227265 - Make pkgsplit() allow "versiony looking parts" in package names, X-Git-Tag: v2.1.6.11~13 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2abe69696aa6a196641d3fd3f607b738d3d6c9c7;p=portage.git 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 --- 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