Ian Stakenvicius wrote:
Technically it could, but the issue here would be what you are going
to do with a has_version check on an IUSE_RUNTIME dep -- the package
should do filesystem-identical installs no matter what status of
IUSE_RUNTIME flags, so whatever one would do with a has_version check
would have to not change any part of the build or installation.
In principle it would be used for more or less the same thing as it
would in a dependency, i.e. check whether the runtime-only dependencies
for that feature are satisfied - the difference being that the package
can specify arbitrary if-yes and if-no behaviours, rather than just
"fail the dependency resolution" or not. (Modulo the problem being
discussed in this subthread, that a "no" answer isn't reliable.)
For example, some tool used during the build might have a "slow" mode
that always works, and a "fast" mode that requires some other program to
be installed and that has to be requested explicitly. So the package
that uses the tool might want to do something like
src_compile() {
if has_version dev-util/buildtool[fast]; then
buildtool --fast
else
buildtool
fi
}