diff options
author | Brian Harring <ferringb@gentoo.org> | 2006-01-04 08:57:07 +0000 |
---|---|---|
committer | Brian Harring <ferringb@gentoo.org> | 2006-01-04 08:57:07 +0000 |
commit | e6ced363811c3f99cf7223d5ffd58c7fd7320a09 (patch) | |
tree | 8cc351d49b680a938c344506e74faa750a2ba1be | |
parent | 6da57dc735bbc4198a09011a613f6c9888996f02 (diff) | |
download | portage-e6ced363811c3f99cf7223d5ffd58c7fd7320a09.tar.gz portage-e6ced363811c3f99cf7223d5ffd58c7fd7320a09.tar.bz2 portage-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
-rw-r--r-- | pym/portage_dep.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pym/portage_dep.py b/pym/portage_dep.py index 59a48185d..5467e0055 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] |