diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-03-11 06:17:19 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-03-11 06:17:19 +0000 |
commit | 4c3b7049201096fccdd5cfd922e52fcb7701dea0 (patch) | |
tree | fc26271a4b66f07a0a89602f97ea2eb9d7b97165 /pym | |
parent | 048be802ce0117b1a3c7f4e4bd33517bc303da16 (diff) | |
download | portage-4c3b7049201096fccdd5cfd922e52fcb7701dea0.tar.gz portage-4c3b7049201096fccdd5cfd922e52fcb7701dea0.tar.bz2 portage-4c3b7049201096fccdd5cfd922e52fcb7701dea0.zip |
Make USE_EXPAND wildcard expansion more efficient, and prevent possible
duplicates. (trunk r12703)
svn path=/main/branches/2.1.6/; revision=12958
Diffstat (limited to 'pym')
-rw-r--r-- | pym/portage/__init__.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index c662e4e60..3820dcf34 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -2137,10 +2137,11 @@ class config(object): if has_wildcard: # * means to enable everything in IUSE that's not masked if has_iuse: - for x in iuse_implicit: - if x[:prefix_len] == prefix and x not in self.usemask: - suffix = x[prefix_len:] - var_split.append(suffix) + for suffix in has_iuse: + x = prefix + suffix + if x not in usemask: + if suffix not in expand_flags: + var_split.append(suffix) use.add(x) else: # If there is a wildcard and no matching flags in IUSE then |