On Tue, Aug 21, 2018 at 9:21 PM Thomas Deutschmann <whi...@gentoo.org> wrote: > > On 2018-08-21 18:23, Michał Górny wrote: > >> Wait, are you saying that I can set USE=-test while FEATURES=test is > >> enabled? Is that a valid combination? > > > > Yes. > > The only thing I still don't understand yet: Do we support things like that? > > I.e. should we add things like > > > if has test ${FEATURES} && ! use test ; then > > eerror "FEATURES=test requires USE=test." > > die "FEATURES=test set but not USE=test" > > fi
You should never look at FEATURES in an ebuild; it is not defined in PMS and is very Portage-specific. > if a package's src_test phase requires some conditional stuff or is it > something like "user shoot himself into the foot" so we do *not* care > because we still assume "if FEATURES=test, USE=test is *normally* set"? Ebuilds should be adjusted to not depend on FEATURES=test matching USE=test. Setting RESTRICT="!test? ( test )" is generally sufficient. > Asking from user experience point of view: Imagine a user tries to > emerge a package which will compile multiple hours and src_test just > fails because some conditional stuff didn't run due to USE=-test > accidentally set by the user (in the past or was forgotten). What user is going to set FEATURS=test and USE=-test? It's such a silly thing to worry about. Please stop inflating the scope of the issue.