[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    Re: [gentoo-dev] [pre-GLEP] Optional runtime dependencies via runtime-switchable USE flags
From:       Michał Górny <mgorny () gentoo ! org>
Date:       2012-06-22 21:37:36
Message-ID: 20120622233736.461d4698 () pomiocik ! lan
[Download RAW message or body]


On Fri, 22 Jun 2012 19:29:15 +0100
David Leverton <levertond@googlemail.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

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic