From f29be32f283b694c2179522d451ae6195ef23125 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 11 Mar 2009 06:22:00 +0000 Subject: Fix a case in which a SRC_URI is incorrectly idendified as invalid, and add a corresponding test case. Thanks to Jacob Floyd for reporting. (trunk r12716) svn path=/main/branches/2.1.6/; revision=12971 --- pym/portage/dbapi/porttree.py | 3 +++ pym/portage/tests/dep/test_src_uri.py | 1 + 2 files changed, 4 insertions(+) diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index ab5e9ba13..5fcb50ce5 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -66,6 +66,9 @@ def _src_uri_validate(cpv, eapi, src_uri): "supported with EAPI='%s'") % (cpv, eapi)) operator = x continue + if operator is None: + uri = x + continue if operator is not None: if "/" in x: raise portage.exception.InvalidDependString( diff --git a/pym/portage/tests/dep/test_src_uri.py b/pym/portage/tests/dep/test_src_uri.py index 84c9f29b6..e53297968 100644 --- a/pym/portage/tests/dep/test_src_uri.py +++ b/pym/portage/tests/dep/test_src_uri.py @@ -23,6 +23,7 @@ class SrcUri(TestCase): ( "2", "http://foo/bar ->" , False ), ( "2", "foo? ( http://foo/bar -> ) blah.tbz2" , False ), ( "2", "http://foo/bar -> foo/blah.tbz2" , False ), + ( "2", "http://foo.com/foo http://foo/bar -> blah.tbz2" , True ), ] for eapi, src_uri, valid in tests: -- cgit v1.2.3-1-g7c22