Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 278747 - gnatbuild.eclass FEATURES misuse (noman noinfo)
Summary: gnatbuild.eclass FEATURES misuse (noman noinfo)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High QA (vote)
Assignee: ada team [OBSOLETE]
URL:
Whiteboard:
Keywords: QAcanfix
Depends on:
Blocks: 174335
  Show dependency tree
 
Reported: 2009-07-22 19:30 UTC by Thilo Bangert (RETIRED) (RETIRED)
Modified: 2010-01-22 13:29 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2009-07-22 19:30:47 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 George Shapovalov (RETIRED) gentoo-dev 2010-01-22 12:57:48 UTC
Well, I can pull this, but IIRC, this was done on some request some time ago (it been quite a while, so I am fuzzy on particulars) to make installation of man and info pages conditional (and FEATURES was kind of *the defining* indicator). How are we supposed to test for that then and do we supposed to even care? I mean, are we supposed tom make this conditional or not?
Comment 2 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2010-01-22 13:12:29 UTC
use a USE flag - introduce a local USE flags like 'man-pages' or similar.

personally i'd only make it optional if it pulls in extra dependancies and/or takes a lot of time build.
Comment 3 George Shapovalov (RETIRED) gentoo-dev 2010-01-22 13:29:15 UTC
Ok, I removed optional removal of extra docs. The impact is minimal and, to start with, I didn't see such a big need in it back then :).