* [gentoo-commits] portage r12922 - in main/branches/2.1.6/pym/portage: . tests/dep
@ 2009-03-11 5:57 Zac Medico (zmedico)
0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2009-03-11 5:57 UTC (permalink / raw
To: gentoo-commits
Author: zmedico
Date: 2009-03-11 05:57:35 +0000 (Wed, 11 Mar 2009)
New Revision: 12922
Modified:
main/branches/2.1.6/pym/portage/dep.py
main/branches/2.1.6/pym/portage/tests/dep/test_isvalidatom.py
Log:
Make isvalidatom() identify empty slot as invalid (missing slot is valid) and
add a corresponding test case. (trunk r12654)
Modified: main/branches/2.1.6/pym/portage/dep.py
===================================================================
--- main/branches/2.1.6/pym/portage/dep.py 2009-03-11 05:57:06 UTC (rev 12921)
+++ main/branches/2.1.6/pym/portage/dep.py 2009-03-11 05:57:35 UTC (rev 12922)
@@ -773,6 +773,10 @@
else:
atom = atom[1:]
+ if dep_getslot(atom) == "":
+ # empty slot is invalid (None is valid)
+ return 0
+
try:
use = dep_getusedeps(atom)
if use:
Modified: main/branches/2.1.6/pym/portage/tests/dep/test_isvalidatom.py
===================================================================
--- main/branches/2.1.6/pym/portage/tests/dep/test_isvalidatom.py 2009-03-11 05:57:06 UTC (rev 12921)
+++ main/branches/2.1.6/pym/portage/tests/dep/test_isvalidatom.py 2009-03-11 05:57:35 UTC (rev 12922)
@@ -25,6 +25,7 @@
( "sys-apps/portage:foo", True ),
( "sys-apps/portage-2.1:foo", False ),
( "sys-apps/portage-2.1:", False ),
+ ( "sys-apps/portage-2.1:[foo]", False ),
( "=sys-apps/portage-2.2*:foo[bar?,!baz?,!doc=,build=]", True ),
( "=sys-apps/portage-2.2*:foo[doc?]", True ),
( "=sys-apps/portage-2.2*:foo[!doc?]", True ),
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-03-11 5:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-11 5:57 [gentoo-commits] portage r12922 - in main/branches/2.1.6/pym/portage: . 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