projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
64948b1
)
Add -* support to stack_lists() and use dict.pop() for removal of flags when appropriate.
author
Zac Medico
<zmedico@gentoo.org>
Tue, 17 Oct 2006 09:49:48 +0000
(09:49 -0000)
committer
Zac Medico
<zmedico@gentoo.org>
Tue, 17 Oct 2006 09:49:48 +0000
(09:49 -0000)
svn path=/main/trunk/; revision=4736
pym/portage_util.py
patch
|
blob
|
history
diff --git
a/pym/portage_util.py
b/pym/portage_util.py
index 995688d039214109495e7f3d19a275249cdf1eff..d07fe63c9b568462f0be5c0af6a7bc33828c5e5c 100644
(file)
--- a/
pym/portage_util.py
+++ b/
pym/portage_util.py
@@
-137,9
+137,13
@@
def stack_lists(lists, incremental=1):
new_list = {}
for x in lists:
for y in filter(None, x):
- if incremental and y.startswith("-"):
- if y[1:] in new_list:
- del new_list[y[1:]]
+ if incremental:
+ if y == "-*":
+ new_list.clear()
+ elif y.startswith("-"):
+ new_list.pop(y[1:], None)
+ else:
+ new_list[y] = True
else:
new_list[y] = True
return new_list.keys()