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