public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r11526 - in main/trunk/pym/portage: dbapi tests/dep
@ 2008-09-20 16:55 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2008-09-20 16:55 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2008-09-20 16:55:27 +0000 (Sat, 20 Sep 2008)
New Revision: 11526

Modified:
   main/trunk/pym/portage/dbapi/porttree.py
   main/trunk/pym/portage/tests/dep/test_src_uri.py
Log:
More SRC_URI validation.


Modified: main/trunk/pym/portage/dbapi/porttree.py
===================================================================
--- main/trunk/pym/portage/dbapi/porttree.py	2008-09-20 09:33:49 UTC (rev 11525)
+++ main/trunk/pym/portage/dbapi/porttree.py	2008-09-20 16:55:27 UTC (rev 11526)
@@ -68,6 +68,10 @@
 				raise portage.exception.InvalidDependString(
 					("getFetchMap(): '%s' SRC_URI '/' character in " + \
 					"file name: '%s'") % (cpv, x))
+			if x[-1] == "?":
+				raise portage.exception.InvalidDependString(
+					("getFetchMap(): '%s' SRC_URI arrow missing " + \
+					"right operand") % (cpv,))
 		uri = None
 		operator = None
 

Modified: main/trunk/pym/portage/tests/dep/test_src_uri.py
===================================================================
--- main/trunk/pym/portage/tests/dep/test_src_uri.py	2008-09-20 09:33:49 UTC (rev 11525)
+++ main/trunk/pym/portage/tests/dep/test_src_uri.py	2008-09-20 16:55:27 UTC (rev 11526)
@@ -16,6 +16,9 @@
 			( "1", "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 ),
+			( "2", "http://foo/bar -> bar.tbz2 foo? ( ftp://foo/a )" , True  ),
+			( "2", "http://foo/bar blah.tbz2 ->"                     , False ),
 			( "2", "-> http://foo/bar blah.tbz2 )"                   , False ),
 			( "2", "http://foo/bar ->"                               , False ),
 			( "2", "foo? ( http://foo/bar -> ) blah.tbz2"            , False ),




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

only message in thread, other threads:[~2008-09-20 16:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-20 16:55 [gentoo-commits] portage r11526 - in main/trunk/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