From: Zac Medico Date: Thu, 26 Mar 2009 01:40:22 +0000 (-0000) Subject: Bug #227265 - Make pkgsplit() allow multiple consecutive hyphens in package X-Git-Tag: v2.2_rc28~12 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=172f1b5c4f1ae5e64098f7e9438d36ebc3c2241f;p=portage.git Bug #227265 - Make pkgsplit() allow multiple consecutive hyphens in package names, and add corresponding test cases. svn path=/main/trunk/; revision=13187 --- diff --git a/pym/portage/tests/dep/test_isvalidatom.py b/pym/portage/tests/dep/test_isvalidatom.py index a10d730b3..e74ec8ff5 100644 --- a/pym/portage/tests/dep/test_isvalidatom.py +++ b/pym/portage/tests/dep/test_isvalidatom.py @@ -64,8 +64,10 @@ class IsValidAtom(TestCase): ( "=null/portage-2.1*", True ), ( "=foo/bar-123-1", True ), ( "=foo/bar-123-1-r1", True ), - ( "=foo/bar--baz-1-r1", False ), - ( "=foo/bar-baz--1-r1", False ), + ( "=foo/bar--baz-1-r1", True ), + ( "=foo/bar-baz--1-r1", True ), + ( "=foo/bar-baz---1-r1", True ), + ( "=foo/bar-baz---1", True ), ( "=foo/bar-baz-1--r1", False ), ] diff --git a/pym/portage/versions.py b/pym/portage/versions.py index a5f4c6c1a..d3f256dc0 100644 --- a/pym/portage/versions.py +++ b/pym/portage/versions.py @@ -219,13 +219,7 @@ def pkgsplit(mypkg,silent=1): print "!!! Name error in",mypkg+": missing a version or name part." pkgcache[mypkg]=None return None - for x in myparts: - if len(x)==0: - if not silent: - print "!!! Name error in",mypkg+": empty \"-\" part." - pkgcache[mypkg]=None - return None - + #verify rev revok=0 myrev=myparts[-1]