1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA256 |
3 |
|
4 |
On 21/06/12 03:05 PM, David Leverton wrote: |
5 |
> Michał Górny wrote: |
6 |
>> Hello, |
7 |
>> |
8 |
>> A simple solution to a program long-unsolved. In GLEP form. |
9 |
> |
10 |
> Just a couple of minor points/nitpicks: |
11 |
> |
12 |
> [ Snip! ] |
13 |
> |
14 |
> 2) It's not forbidden for package A to depend on an IUSE_RUNTIME |
15 |
> flag of package B being disabled, but it's unlikely to be useful. |
16 |
> To make this more concrete, a fictional but vaguely plausible |
17 |
> example: |
18 |
> |
19 |
> app-text/docmangler: |
20 |
> |
21 |
> # links to poppler to handle PDFs, and can use Ghostscript for # |
22 |
> PostScript support if available IUSE="postscript" |
23 |
> IUSE_RUNTIME="postscript" DEPEND="app-text/poppler" |
24 |
> RDEPEND="${DEPEND} postscript? ( app-text/ghostscript )" |
25 |
> |
26 |
> app-misc/coolapp: |
27 |
> |
28 |
> IUSE="doc" # if Ghostscript is installed, docmangler uses it for |
29 |
> both # PostScript and PDF files, but Ghostscript misrenders our |
30 |
> PDFs DEPEND="doc? ( app-text/docmangler[-postscript] )" |
31 |
> |
32 |
> Here, the [-postscript] dep would force the user to disable that |
33 |
> flag, but it wouldn't do much good because Ghostscript would still |
34 |
> be installed. This doesn't happen with regular USE flags because |
35 |
> (if the ebuild is written correctly) disabling the flag removes the |
36 |
> feature even if its dependencies happen to be installed. |
37 |
> |
38 |
> Possible solutions: |
39 |
> |
40 |
> a) automatically rewrite the dep as postscript? ( |
41 |
> app-text/ghostscript ) !postscript? ( !app-text/ghostscript ) b) |
42 |
> forbid [-foo]-style deps for IUSE_RUNTIME flags (would also make |
43 |
> sense in that case to disallow them in !foo-style conditionals in |
44 |
> the dependencies of the package itself, as that could cause similar |
45 |
> paradoxes) c) don't address it in the spec itself, and require |
46 |
> people to manually write the dep in the blocker form if it's |
47 |
> required d) something else? |
48 |
> |
49 |
> a) is pretty icky IMHO, especially if the flag pulls in multiple |
50 |
> packages. I could live with either b) or c), but b) is less |
51 |
> flexible and c) leaves a potential trap for the unwary. Any |
52 |
> opinions? |
53 |
> |
54 |
|
55 |
I'd say (c) , since IUSE_RUNTIME is not an enforceable state of the |
56 |
tree and if docmangler is used but fails when ghostscript is installed |
57 |
anyways, then the DEPEND should specify this regardless of whether the |
58 |
'postscript' flag (used by IUSE_RUNTIME) is set or whether ghostscript |
59 |
is in the user's world file. |
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
-----BEGIN PGP SIGNATURE----- |
66 |
Version: GnuPG v2.0.17 (GNU/Linux) |
67 |
|
68 |
iF4EAREIAAYFAk/jc+cACgkQ2ugaI38ACPCUOAD+ICKl69MUhUTRj+2HBQ0pNlvo |
69 |
Bqa5/TmaD0oKIkLi+xgBAIGwynEBXC3dXsG7Amky0OiEUyen41kURybNLR8FIkT2 |
70 |
=jMZ4 |
71 |
-----END PGP SIGNATURE----- |