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:40:11
In Reply to: Re: [gentoo-dev] [pre-GLEP] Optional runtime dependencies via runtime-switchable USE flags by Marien Zwart
Marien Zwart wrote:
>> Possible solutions: >> >> a) automatically rewrite the dep as >> postscript? ( app-text/ghostscript ) >> !postscript? ( !app-text/ghostscript ) > > There may be more than one version of docmangler, with a postscript flag > with different effects (IUSE_RUNTIME or full IUSE, different > dependencies). That means this kind of rewriting would have to be done > based on the dependencies of the docmangler installed at the time this > package gets built, which seems like entirely too much magic, and...
To clarify, I meant rewrite the dep in docmangler itself, and not necessarily on disk in the VDB or wherever, just in memory when parsing it. But as I said, I don't like that idea anyway, I just mentioned it for completeness.
>> b) forbid [-foo]-style deps for IUSE_RUNTIME flags (would also make >> sense in that case to disallow them in !foo-style conditionals in the >> dependencies of the package itself, as that could cause similar paradoxes) > > this seems generally impossible, as the same USE flag may be > IUSE_RUNTIME in only some versions of docmangler.
True. We could declare that in situations like that the developer just needs to be more careful, but then it's not that much better than c)....
>> c) don't address it in the spec itself, and require people to manually >> write the dep in the blocker form if it's required > > I would be in favor of leaving this up to the writer of the coolapp > ebuild, especially as if docmangler is currently using a "full" USE flag > for postscript this is already currently broken.
Well, in theory if it's a normal USE flag then disabling it should actively remove the Ghostscript support from docmangler, even if Ghostscript happens to be installed, but maybe it doesn't always work out that way.