Gentoo Development Guide
Query Functions Reference
The following functions, which are provided by ebuild.sh, can be used to
query variables and similar state.
| Function | Details |
use flagname
|
Returns a true value if and only if flagname is enabled.
The condition is inverted if prefixed with an exclamation mark,
!flagname.
It is guaranteed that use produces no output.
|
useq flagname
|
Deprecated synonym for use.
|
usev flagname
|
As use, echoes flagname upon success.
|
use_enable flag str val
|
Echoes either --enable-str=val or --disable-str depending upon useq flag.
If str is not specified, uses flag instead. If val is not specified, omits
the assignment part.
|
use_with flag str val
|
As use_enable, but --with- or --without-.
|
has flag string
|
Returns true if flag is included in the flag list string
(example: if has ccache $FEATURES ; then).
The condition is inverted if prefixed with an exclamation mark,
!flag.
It is guaranteed that has produces no output.
|
hasq flag string
|
Deprecated synonym for has.
|
hasv flag string
|
As has, echoes flag on success.
|
best_version pkg
|
Echoes the 'best' version of pkg which is currently installed.
|
has_version pkg
|
True if pkg (can include version specifiers) is installed.
|