diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-05-25 22:13:52 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-05-25 22:13:52 +0000 |
commit | 5042fdb6c41a91298030e7c5792ace44fa5d1b6b (patch) | |
tree | aa72bf1307ef809b6ab55fcd9195e6366a92e0c7 /pym/portage.py | |
parent | aa91534ed6e2ba85cd91993f3f4855c6b5df3976 (diff) | |
download | portage-5042fdb6c41a91298030e7c5792ace44fa5d1b6b.tar.gz portage-5042fdb6c41a91298030e7c5792ace44fa5d1b6b.tar.bz2 portage-5042fdb6c41a91298030e7c5792ace44fa5d1b6b.zip |
Store flags as a set inside the USE incremental loop. (trunk r6627)
svn path=/main/branches/2.1.2/; revision=6628
Diffstat (limited to 'pym/portage.py')
-rw-r--r-- | pym/portage.py | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/pym/portage.py b/pym/portage.py index d6c6a0b82..676eee148 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -1868,7 +1868,7 @@ class config: self.uvlist.append(self.configdict[x]) self.uvlist.reverse() - myflags = [] + myflags = set() for curdb in self.uvlist: cur_use_expand = [x for x in use_expand if x in curdb] mysplit = curdb.get("USE", "").split() @@ -1876,7 +1876,7 @@ class config: continue for x in mysplit: if x == "-*": - myflags = [] + myflags.clear() continue if x[0] == "+": @@ -1887,19 +1887,18 @@ class config: continue if x[0] == "-": - try: - myflags.remove(x[1:]) - except ValueError: - pass + myflags.discard(x[1:]) continue - myflags.append(x) + myflags.add(x) for var in cur_use_expand: var_lower = var.lower() if var not in myincrementals: prefix = var_lower + "_" - myflags = [x for x in myflags if not x.startswith(prefix)] + for x in list(myflags): + if x.startswith(prefix): + myflags.remove(x) for x in curdb[var].split(): # Any incremental USE_EXPAND variables have already been # processed, so leading +/- operators are invalid here. @@ -1913,9 +1912,8 @@ class config: "non-incremental variable '%s': '%s'\n" % (var, x)), noiselevel=-1) continue - myflags.append(var_lower + "_" + x) + myflags.add(var_lower + "_" + x) - myflags = set(myflags) myflags.update(self.useforce) # FEATURES=test should imply USE=test |