summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-02-27 00:03:26 +0000
committerZac Medico <zmedico@gentoo.org>2009-02-27 00:03:26 +0000
commit95d0e9c226edb5bfde26808b1298890f62949889 (patch)
treebfc82bed7250cc0b1a353da5083f72a8442d627a /pym
parentbc63450711c847c367fc5c105c1488cb76e7b991 (diff)
downloadportage-95d0e9c226edb5bfde26808b1298890f62949889.tar.gz
portage-95d0e9c226edb5bfde26808b1298890f62949889.tar.bz2
portage-95d0e9c226edb5bfde26808b1298890f62949889.zip
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. svn path=/main/trunk/; revision=12716
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/dbapi/porttree.py3
-rw-r--r--pym/portage/tests/dep/test_src_uri.py1
2 files changed, 4 insertions, 0 deletions
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: