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

Bug 278949

Summary: sys-fs/evms FEATURES misuse (userpriv)
Product: Gentoo Linux Reporter: Thilo Bangert (RETIRED) (RETIRED) <bangert>
Component: New packagesAssignee: Tiziano Müller (RETIRED) <dev-zero>
Status: RESOLVED WONTFIX    
Severity: QA CC: base-system
Priority: High Keywords: QAcanfix
Version: 1.0   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 174335, 372423    
Attachments: fixes FEATURES userpriv misuse

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

affected ebuilds:
evms-2.5.5-r10.ebuild:          hasq userpriv ${FEATURES} && ewarn "These tests have to run as root. Disable userpriv!"
evms-2.5.5-r10.ebuild:  if hasq userpriv ${FEATURES} ; then
evms-2.5.5-r5.ebuild:           hasq userpriv ${FEATURES} && ewarn "These tests have to run as root. Disable userpriv!"
evms-2.5.5-r5.ebuild:   if hasq userpriv ${FEATURES} ; then

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 Ross Smith 2010-08-21 17:08:25 UTC
Created attachment 243909 [details]
fixes FEATURES userpriv misuse

fixed userpriv checks  via, if [[ ${EUID} -ne 0]] per the template message.
Comment 2 Markos Chandras (RETIRED) gentoo-dev 2011-07-03 09:21:00 UTC
sys-fs/evms has been removed from portage tree