summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/package/ebuild/config.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 84cf2e022..2073f7fe6 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -1319,8 +1319,9 @@ class config(object):
use.discard("test")
else:
use.add("test")
- if ebuild_force_test:
- self.usemask.discard("test")
+ if ebuild_force_test and "test" in self.usemask:
+ self.usemask = \
+ frozenset(x for x in self.usemask if x != "test")
# Allow _* flags from USE_EXPAND wildcards to pass through here.
use.difference_update([x for x in use \