* [gentoo-commits] portage r9859 - main/branches/2.1.2/pym
@ 2008-04-12 20:37 Zac Medico (zmedico)
0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2008-04-12 20:37 UTC (permalink / raw
To: gentoo-commits
Author: zmedico
Date: 2008-04-12 20:37:49 +0000 (Sat, 12 Apr 2008)
New Revision: 9859
Modified:
main/branches/2.1.2/pym/portage.py
Log:
Fix the filtering for bug #215016:
* fix broken comparison for he iuse filtering
* filter out any duplicates that variable may contain
(trunk r9858)
Modified: main/branches/2.1.2/pym/portage.py
===================================================================
--- main/branches/2.1.2/pym/portage.py 2008-04-12 20:32:52 UTC (rev 9858)
+++ main/branches/2.1.2/pym/portage.py 2008-04-12 20:37:49 UTC (rev 9859)
@@ -2106,19 +2106,16 @@
has_wildcard = "*" in var_split
if has_wildcard:
var_split = [ x for x in var_split if x != "*" ]
- has_iuse = False
+ has_iuse = set()
for x in iuse_implicit:
if x.startswith(prefix):
- has_iuse = True
- break
+ has_iuse.add(x[prefix_len:])
if has_wildcard:
# * means to enable everything in IUSE that's not masked
if has_iuse:
for x in iuse_implicit:
if x.startswith(prefix) and x not in self.usemask:
suffix = x[prefix_len:]
- if suffix in var_split:
- continue
var_split.append(suffix)
use.add(x)
else:
@@ -2126,7 +2123,17 @@
# LINGUAS should be unset so that all .mo files are
# installed.
var_split = []
- var_split = [x for x in var_split if x in iuse_implicit]
+ # Make the flags unique and filter them according to IUSE.
+ # Also, continue to preserve order for things like LINGUAS
+ # and filter any duplicates that variable may contain.
+ filtered_var_split = []
+ remaining = has_iuse.intersection(var_split)
+ for x in var_split:
+ if x in remaining:
+ remaining.remove(x)
+ filtered_var_split.append(x)
+ var_split = filtered_var_split
+
if var_split:
self[var] = " ".join(var_split)
else:
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-04-12 20:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-12 20:37 [gentoo-commits] portage r9859 - main/branches/2.1.2/pym 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