Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 278730

Summary: sys-power/iasl FEATURES misuse (test)
Product: Gentoo Linux Reporter: Thilo Bangert (RETIRED) (RETIRED) <bangert>
Component: New packagesAssignee: Robin Johnson <robbat2>
Status: RESOLVED FIXED    
Severity: QA Keywords: QAcanfix
Priority: High    
Version: 1.0   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 174335    

Description Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2009-07-22 18:47:40 UTC
The above package has been found to use FEATURES in at least one of its ebuilds.

FEATURES is a portage specific package manager configuration variable not specified in PMS and cannot reliably be used in ebuilds or eclasses.

Usually there are a number of ways to achieve the same thing though. In other cases, the usage of FEATURES in the ebuild is simply invalid.

If you need to check whether "test" is in ${FEATURES}, you can test if the USE flag "test" is set, since it will be activated in that case.

When you check for "userpriv" in ${FEATURES} you may be able to something like the following instead:

if [[ ${EUID} -eq 0 ]]; then
  rootstuff
else
  nonrootstuff
fi

Thanks
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-07-22 20:32:37 UTC
No, 'use test' is NOT equivalent to "hasq test $FEATURES".

FEATURES=-test USE=test emerge ...
hasq test FEATURES => false
use test => true

USE=test => build with support for tests.
FEATURES=test => actually run the tests.

Comment 2 Ciaran McCreesh 2009-07-22 20:38:02 UTC
The use description for USE=test tells you that you shouldn't set it manually.
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-07-31 06:47:35 UTC
InCVS.

Anybody that sets USE=test manually, well, their problem.