Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: levertond@××××××××××.com
Subject: Re: [gentoo-dev] [pre-GLEP] Optional runtime dependencies via runtime-switchable USE flags
Date: Fri, 22 Jun 2012 21:37:05
Message-Id: 20120622233736.461d4698@pomiocik.lan
In Reply to: Re: [gentoo-dev] [pre-GLEP] Optional runtime dependencies via runtime-switchable USE flags by David Leverton
On Fri, 22 Jun 2012 19:29:15 +0100
David Leverton <levertond@××××××××××.com> wrote:

> 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 > }
And that particular example should be perfectly valid, to be honest. There is just a little risk that fast mode wouldn't be used when it could. Of course, it's quite unlikely that such an option was actually based on runtime dep... -- Best regards, Michał Górny


File name MIME type
signature.asc application/pgp-signature