public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r13052 - in main/branches/2.1.6/pym/portage: dbapi tests/dep
@ 2009-03-11  7:45 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2009-03-11  7:45 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2009-03-11 07:45:33 +0000 (Wed, 11 Mar 2009)
New Revision: 13052

Modified:
   main/branches/2.1.6/pym/portage/dbapi/porttree.py
   main/branches/2.1.6/pym/portage/tests/dep/test_src_uri.py
Log:
Make _src_uri_validate() identify the || operator as invalid and add a
corresponding test case. (trunk r12820)

Modified: main/branches/2.1.6/pym/portage/dbapi/porttree.py
===================================================================
--- main/branches/2.1.6/pym/portage/dbapi/porttree.py	2009-03-11 07:45:21 UTC (rev 13051)
+++ main/branches/2.1.6/pym/portage/dbapi/porttree.py	2009-03-11 07:45:33 UTC (rev 13052)
@@ -45,6 +45,11 @@
 			uri = None
 			_src_uri_validate(cpv, eapi, x)
 			continue
+		if x == '||':
+			raise portage.exception.InvalidDependString(
+				("getFetchMap(): '%s' SRC_URI contains invalid " + \
+				"|| operator") % (cpv,))
+
 		if x[-1:] == "?":
 			if operator is not None:
 				raise portage.exception.InvalidDependString(

Modified: main/branches/2.1.6/pym/portage/tests/dep/test_src_uri.py
===================================================================
--- main/branches/2.1.6/pym/portage/tests/dep/test_src_uri.py	2009-03-11 07:45:21 UTC (rev 13051)
+++ main/branches/2.1.6/pym/portage/tests/dep/test_src_uri.py	2009-03-11 07:45:33 UTC (rev 13052)
@@ -14,6 +14,7 @@
 		tests = [
 			( "0", "http://foo/bar -> blah.tbz2"                     , False ),
 			( "1", "http://foo/bar -> blah.tbz2"                     , False ),
+			( "2", "|| ( http://foo/bar -> blah.tbz2 )"              , False ),
 			( "2", "http://foo/bar -> blah.tbz2"                     , True  ),
 			( "2", "foo? ( http://foo/bar -> blah.tbz2 )"            , True  ),
 			( "2", "http://foo/bar -> foo? ( ftp://foo/a )"          , False ),




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-11  7:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-11  7:45 [gentoo-commits] portage r13052 - in main/branches/2.1.6/pym/portage: dbapi tests/dep Zac Medico (zmedico)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox