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

Bug 278960

Summary: dev-db/postgresql FEATURES misuse (test userpriv)
Product: Gentoo Linux Reporter: Thilo Bangert (RETIRED) (RETIRED) <bangert>
Component: New packagesAssignee: PgSQL Bugs <pgsql-bugs>
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-24 19:07:10 UTC
The above package has been found to use FEATURES in at least one of its ebuilds.

Affected ebuilds:
postgresql-7.3.21.ebuild:       if hasq userpriv ${FEATURES} ; then
postgresql-7.3.21.ebuild:                       hasq test ${FEATURES} && die "Make check failed. See above for details."
postgresql-7.3.21.ebuild:                       hasq test ${FEATURES} || eerror "Make check failed. See above for details."
postgresql-7.3.21.ebuild:               eerror "Tests won't be run if FEATURES=userpriv is disabled!"
postgresql-7.4.19.ebuild:       if hasq userpriv ${FEATURES} ; then
postgresql-7.4.19.ebuild:                       hasq test ${FEATURES} && die "Make check failed. See above for details."
postgresql-7.4.19.ebuild:                       hasq test ${FEATURES} || eerror "Make check failed. See above for details."
postgresql-7.4.19.ebuild:               eerror "Tests won't be run if FEATURES=userpriv is disabled!"
postgresql-8.0.15.ebuild:       if hasq userpriv ${FEATURES} ; then
postgresql-8.0.15.ebuild:                       hasq test ${FEATURES} && die "Make check failed. See above for details."
postgresql-8.0.15.ebuild:                       hasq test ${FEATURES} || eerror "Make check failed. See above for details."
postgresql-8.0.15.ebuild:               eerror "Tests won't be run if FEATURES=userpriv is disabled!"
postgresql-8.1.11.ebuild:               if ! hasq userpriv ${FEATURES} ; then
postgresql-8.1.11.ebuild:               hasq test ${FEATURES} && die "Make check failed. See above for details."
postgresql-8.1.11.ebuild:               hasq test ${FEATURES} || eerror "Make check failed. See above for details."
postgresql-8.2.6.ebuild:                if ! hasq userpriv ${FEATURES} ; then
postgresql-8.2.6.ebuild:                hasq test ${FEATURES} && die "Make check failed. See above for details."
postgresql-8.2.6.ebuild:                hasq test ${FEATURES} || eerror "Make check failed. See above for details."
postgresql-8.2.7.ebuild:                if ! hasq userpriv ${FEATURES} ; then
postgresql-8.2.7.ebuild:                hasq test ${FEATURES} && die "Make check failed. See above for details."
postgresql-8.2.7.ebuild:                hasq test ${FEATURES} || eerror "Make check failed. See above for details."


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 Patrick Lauer gentoo-dev 2010-07-11 22:35:52 UTC
Package gone.