summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-03-25 23:46:10 +0000
committerZac Medico <zmedico@gentoo.org>2009-03-25 23:46:10 +0000
commite1845d6a8d5eb1e056b1831d1f0fe37b614c1ed7 (patch)
tree1aa7d8bcf9531a0d058f3f5f487606b2d20fb278
parent88e4aaac4370362d41fafacc22440b6f1bb323e3 (diff)
downloadportage-e1845d6a8d5eb1e056b1831d1f0fe37b614c1ed7.tar.gz
portage-e1845d6a8d5eb1e056b1831d1f0fe37b614c1ed7.tar.bz2
portage-e1845d6a8d5eb1e056b1831d1f0fe37b614c1ed7.zip
Bug #227265 - Make pkgsplit() allow "versiony looking parts" in package names,
for pms compliance. Also, add corresponding test cases. svn path=/main/trunk/; revision=13185
-rw-r--r--pym/portage/tests/dep/test_isvalidatom.py5
-rw-r--r--pym/portage/versions.py5
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