Bug #227265 - Make pkgsplit() allow "versiony looking parts" in package names,
authorZac Medico <zmedico@gentoo.org>
Wed, 25 Mar 2009 23:46:10 +0000 (23:46 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 25 Mar 2009 23:46:10 +0000 (23:46 -0000)
for pms compliance. Also, add corresponding test cases.

svn path=/main/trunk/; revision=13185

pym/portage/tests/dep/test_isvalidatom.py
pym/portage/versions.py

index 5d6b4e73a12692a32386c50eeaf5be9a82ea2986..6565b96a7b84f32b3418a8af020f2899bba82dde 100644 (file)
@@ -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]:
index 08e4a37445f360bbcb17b847844e6e471bceb605..a5f4c6c1a5fb15bc737c3db142983e1a3a643deb 100644 (file)
@@ -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