summaryrefslogtreecommitdiffstats
path: root/pym/portage_dep.py
diff options
context:
space:
mode:
authorJason Stubbs <jstubbs@gentoo.org>2006-01-24 14:54:31 +0000
committerJason Stubbs <jstubbs@gentoo.org>2006-01-24 14:54:31 +0000
commit7a49b4e62311c7945a64b10c103a49c22461f798 (patch)
tree2c08f83ebd6c2b3810aa9d8463962ac5e196dc19 /pym/portage_dep.py
parent3d7b9c71e677e2065f262885ace3d127e2f42c13 (diff)
downloadportage-7a49b4e62311c7945a64b10c103a49c22461f798.tar.gz
portage-7a49b4e62311c7945a64b10c103a49c22461f798.tar.bz2
portage-7a49b4e62311c7945a64b10c103a49c22461f798.zip
Move DEPEND empty sublist processing back into use_reduce
svn path=/main/trunk/; revision=2578
Diffstat (limited to 'pym/portage_dep.py')
-rw-r--r--pym/portage_dep.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/pym/portage_dep.py b/pym/portage_dep.py
index de5c504cc..116bb2043 100644
--- a/pym/portage_dep.py
+++ b/pym/portage_dep.py
@@ -79,7 +79,11 @@ def use_reduce(deparray, uselist=[], masklist=[], matchall=0, excludeall=[]):
head = mydeparray.pop(0)
if type(head) == types.ListType:
- rlist.append(use_reduce(head, uselist, masklist, matchall, excludeall))
+ additions = use_reduce(head, uselist, masklist, matchall, excludeall)
+ if additions:
+ rlist.append(additions)
+ elif rlist and rlist[-1] in ("||","&&"):
+ raise portage_exception.InvalidDependString("INVALID "+rlist[-1]+" DEPEND STRING: "+str(deparray))
else:
if head[-1] == "?": # Use reduce next group on fail.
@@ -122,7 +126,9 @@ def use_reduce(deparray, uselist=[], masklist=[], matchall=0, excludeall=[]):
if ismatch:
target = newdeparray[-1]
if isinstance(target, list):
- rlist.append(use_reduce(target, uselist, masklist, matchall, excludeall))
+ additions = use_reduce(target, uselist, masklist, matchall, excludeall)
+ if additions:
+ rlist.append(additions)
else:
rlist += [target]