commit:     b150419d28bd7afb98404a829c639584d34efc03
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 13 10:32:26 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Oct 13 10:33:13 2023 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=b150419d

Revert "config: Don't directly modify FEATURES"

This reverts commit 8c2d81eb205bf05445eca616818681e047639eb5.

I get a bunch of lost USE=test with this:
```
$ emerge -p -uvDU @world
[...]
[ebuild   R    ] dev-libs/tree-sitter-bash-0.20.4-r1::gentoo  USE="-test*" 0 KiB
[ebuild   R    ] dev-libs/libffi-3.4.4-r1:0/8::gentoo  USE="-debug 
(-exec-static-trampoline) -pax-kernel -static-libs -test*" ABI_X86="32 (64) 
(-x32)" 0 KiB
[ebuild   R    ] dev-util/pkgconf-2.0.3:0/4::gentoo  USE="-test*" ABI_X86="32 
(64) (-x32)" 0 KiB
[ebuild   R    ] dev-libs/libpipeline-1.5.7::gentoo  USE="-test*" 0 KiB
[ebuild   R    ] dev-util/fq-0.8.0::gentoo  USE="-test*" 0 KiB
[...]
```

Bug: https://bugs.gentoo.org/914441
Signed-off-by: Sam James <sam <AT> gentoo.org>

 lib/portage/package/ebuild/config.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/portage/package/ebuild/config.py 
b/lib/portage/package/ebuild/config.py
index 049c5fa169..f51886c33e 100644
--- a/lib/portage/package/ebuild/config.py
+++ b/lib/portage/package/ebuild/config.py
@@ -2204,7 +2204,7 @@ class config:
                 # "test" is in IUSE and USE=test is masked, so execution
                 # of src_test() probably is not reliable. Therefore,
                 # temporarily disable FEATURES=test just for this package.
-                self.features.remove("test")
+                self["FEATURES"] = " ".join(x for x in self.features if x != 
"test")
 
         # Allow _* flags from USE_EXPAND wildcards to pass through here.
         use.difference_update(

Reply via email to