Gentoo Archives: gentoo-dev

From: David Leverton <levertond@××××××××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [pre-GLEP] Optional runtime dependencies via runtime-switchable USE flags
Date: Fri, 22 Jun 2012 18:31:18
Message-Id: 4FE4B97B.5060908@googlemail.com
In Reply to: Re: [gentoo-dev] [pre-GLEP] Optional runtime dependencies via runtime-switchable USE flags by Ian Stakenvicius
1 Ian Stakenvicius wrote:
2 > Technically it could, but the issue here would be what you are going
3 > to do with a has_version check on an IUSE_RUNTIME dep -- the package
4 > should do filesystem-identical installs no matter what status of
5 > IUSE_RUNTIME flags, so whatever one would do with a has_version check
6 > would have to not change any part of the build or installation.
7
8 In principle it would be used for more or less the same thing as it
9 would in a dependency, i.e. check whether the runtime-only dependencies
10 for that feature are satisfied - the difference being that the package
11 can specify arbitrary if-yes and if-no behaviours, rather than just
12 "fail the dependency resolution" or not. (Modulo the problem being
13 discussed in this subthread, that a "no" answer isn't reliable.)
14
15 For example, some tool used during the build might have a "slow" mode
16 that always works, and a "fast" mode that requires some other program to
17 be installed and that has to be requested explicitly. So the package
18 that uses the tool might want to do something like
19
20 src_compile() {
21 if has_version dev-util/buildtool[fast]; then
22 buildtool --fast
23 else
24 buildtool
25 fi
26 }

Replies