* [gentoo-commits] portage r12892 - in main/branches/2.1.6/pym/portage: . tests/dep
@ 2009-03-11 5:17 Zac Medico (zmedico)
0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2009-03-11 5:17 UTC (permalink / raw
To: gentoo-commits
Author: zmedico
Date: 2009-03-11 05:17:26 +0000 (Wed, 11 Mar 2009)
New Revision: 12892
Modified:
main/branches/2.1.6/pym/portage/dep.py
main/branches/2.1.6/pym/portage/tests/dep/test_isvalidatom.py
Log:
Fix isvalidatom to properly identify an invalid atom such as
'dev-java/nanoxml*'. Thanks to Vlastimil Babka <caster@g.o> for reporting.
(trunk r12613:12617)
Modified: main/branches/2.1.6/pym/portage/dep.py
===================================================================
--- main/branches/2.1.6/pym/portage/dep.py 2009-03-11 05:14:58 UTC (rev 12891)
+++ main/branches/2.1.6/pym/portage/dep.py 2009-03-11 05:17:26 UTC (rev 12892)
@@ -782,6 +782,7 @@
cpv = dep_getcpv(atom)
cpv_catsplit = catsplit(cpv)
+ without_slot = remove_slot(atom)
mycpv_cps = None
if cpv:
if len(cpv_catsplit) == 2:
@@ -795,10 +796,12 @@
mycpv_cps[0] = "null"
if not mycpv_cps:
mycpv_cps = catpkgsplit(cpv)
+ if mycpv_cps is None and cpv != without_slot:
+ return 0
operator = get_operator(atom)
if operator:
- if operator[0] in "<>" and remove_slot(atom).endswith("*"):
+ if operator[0] in "<>" and without_slot[-1:] == "*":
return 0
if mycpv_cps:
if len(cpv_catsplit) == 2:
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:14:58 UTC (rev 12891)
+++ main/branches/2.1.6/pym/portage/tests/dep/test_isvalidatom.py 2009-03-11 05:17:26 UTC (rev 12892)
@@ -57,6 +57,7 @@
( "null/portage", True ),
( "=null/portage", False ),
( "=null/portage*", False ),
+ ( "null/portage*:0", False ),
( ">=null/portage-2.1", True ),
( "~null/portage-2.1", True ),
( "=null/portage-2.1*", True ),]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-03-11 5:17 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:17 [gentoo-commits] portage r12892 - 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