summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Harring <ferringb@gentoo.org>2006-01-04 08:57:07 +0000
committerBrian Harring <ferringb@gentoo.org>2006-01-04 08:57:07 +0000
commite6ced363811c3f99cf7223d5ffd58c7fd7320a09 (patch)
tree8cc351d49b680a938c344506e74faa750a2ba1be /pym/portage_dep.py
parentuse an echo rather than ewarn (diff)
downloadportage-multirepo-e6ced363811c3f99cf7223d5ffd58c7fd7320a09.tar.gz
portage-multirepo-e6ced363811c3f99cf7223d5ffd58c7fd7320a09.tar.bz2
portage-multirepo-e6ced363811c3f99cf7223d5ffd58c7fd7320a09.zip
el buggo pointed out via spyderous.
|| ( a ( x? ( b ) y? ( c ) ) ) -x -y , was resulting in || ( a () ) the main consumer of this, portage.dep_check is stupid, and was assuming () was valid. It's not, obviously. Long term bug, around in at least .51 . Should correct dep_check handling of it also, but no reason to be handing () in the result lists also. svn path=/main/trunk/; revision=2522
Diffstat (limited to 'pym/portage_dep.py')
-rw-r--r--pym/portage_dep.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/pym/portage_dep.py b/pym/portage_dep.py
index 59a48185..5467e005 100644
--- a/pym/portage_dep.py
+++ b/pym/portage_dep.py
@@ -79,7 +79,9 @@ def use_reduce(deparray, uselist=[], masklist=[], matchall=0, excludeall=[]):
head = mydeparray.pop(0)
if type(head) == types.ListType:
- rlist = rlist + [use_reduce(head, uselist, masklist, matchall, excludeall)]
+ additions = use_reduce(head, uselist, masklist, matchall, excludeall)
+ if additions:
+ rlist.append(additions)
else:
if head[-1] == "?": # Use reduce next group on fail.
@@ -122,7 +124,9 @@ def use_reduce(deparray, uselist=[], masklist=[], matchall=0, excludeall=[]):
if ismatch:
target = newdeparray[-1]
if isinstance(target, list):
- rlist += [use_reduce(target, uselist, masklist, matchall, excludeall)]
+ additions = use_reduce(target, uselist, masklist, matchall, excludeall)
+ if additions:
+ rlist.append(additions)
else:
rlist += [target]