1 |
Hi all, |
2 |
|
3 |
I want to raise the question of the correct usage of USE flags. |
4 |
|
5 |
For example, I'm building an ebuild for a game which can optionally use |
6 |
vorbis and/or smpeg, which provide functionality for playing Vorbis or |
7 |
MP3-format music. Without these, the game can only play .wav files and CDA |
8 |
tracks. |
9 |
|
10 |
Now, there exists a USE vorbis flag. I can depend on this in deciding, in the |
11 |
ebuild, whether to include vorbis support or not. |
12 |
However, if USE vorbis isn't set but Vorbis is already installed, should I |
13 |
use it? |
14 |
|
15 |
A worse situation: there is no smpeg USE flag. I have 4 options: |
16 |
1. Force usage of smpeg. |
17 |
2. Use smpeg if it's already installed. |
18 |
3. Never use smpeg. |
19 |
4. Create a USE smpeg flag. |
20 |
|
21 |
Option 4 I dismiss. If we create USE flags for every shared library and util |
22 |
which might possibly be used by another package, there will be a hundred |
23 |
falgs or more and a user won't be able to take time to understand the meaning |
24 |
of each and decide on setting it or not. |
25 |
There seems no reason to do option 3. Option 2 might seem to be a good |
26 |
default, but what about option 1? Is there any good reason not to use smpeg, |
27 |
if it takes only 20 mins to d/l and install and adds important functionality? |
28 |
If there is, we should create a DONT_USE smpeg flag :-) |
29 |
|
30 |
There's more to it than that, however. Suppose the user has no Internet |
31 |
cinnection, right now or at all. He may have the ource archives of the game, |
32 |
but not of smpeg. If we make smpeg a required dependency, he won't be able to |
33 |
install without modifying the ebuild. |
34 |
|
35 |
This is why I think that instead of using cumbersome USE flags, we should |
36 |
very simply ask the user (interactively) what optional dependencies he wants. |
37 |
The USE flags would be used as default choices for a non-interactive |
38 |
installation process. I think this is much more simple and elegant than |
39 |
making the user's choices for him! |
40 |
|
41 |
Comments welcome! |
42 |
|
43 |
|
44 |
-- |
45 |
|
46 |
Dan Armak |
47 |
Gentoo Linux Developer |
48 |
Matan, Israel |