Fix a case in which a SRC_URI is incorrectly idendified as invalid, and add
authorZac Medico <zmedico@gentoo.org>
Wed, 11 Mar 2009 06:22:00 +0000 (06:22 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 11 Mar 2009 06:22:00 +0000 (06:22 -0000)
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
pym/portage/tests/dep/test_src_uri.py

index ab5e9ba131f9a621ee714ee9a0020d4b8b66e04a..5fcb50ce577b72b541e2b162cd698b83e8628301 100644 (file)
@@ -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(
index 84c9f29b6d3f752ebde70fca5017fdf3fd016220..e53297968c540636ae4255fb620f33e22ec648c0 100644 (file)
@@ -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: