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

Bug 278872

Summary: dev-vcs/cvs illegally checks FEATURES
Product: Gentoo Linux Reporter: Thilo Bangert (RETIRED) (RETIRED) <bangert>
Component: [OLD] DevelopmentAssignee: Maintainers for cvs, and cvs related tools (the version control system) [OBSOLETE] <cvs-utils+obsolete>
Status: RESOLVED FIXED    
Severity: QA CC: didier-bugzillagentoo
Priority: High Keywords: QAcanfix
Version: 1.0   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 174335    
Attachments: Replace check for test in $FEATURES by check for test use flag.

Description Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2009-07-23 20:18:48 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 Didier Barvaux 2010-03-27 17:08:17 UTC
Created attachment 225467 [details, diff]
Replace check for test in $FEATURES by check for test use flag.
Comment 2 Didier Barvaux 2010-03-27 17:09:17 UTC
Comment on attachment 225467 [details, diff]
Replace check for test in $FEATURES by check for test use flag.

The attached patch fix the QA problem.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2014-05-13 19:33:02 UTC
And while we're at it, why does it have a src_test() that does an einfo instead of RESTRICT=test like it should?
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2014-05-14 00:18:12 UTC
InCVS