1 |
The USE flags is the way by which portage knows what the main subsystems |
2 |
that the user pretends, and therefore which dependencies it should satisfy |
3 |
when installing an ebuild. In other words, now the USE flags represent in |
4 |
very global terms what the user wants. |
5 |
|
6 |
As Rufiao noticed, the USE flags fail to represent what the system |
7 |
additionally also has, as in the gnome flag example gave by him. |
8 |
|
9 |
To make the USE flags also represent what the system has there would had |
10 |
to be a distinction between the "user wants" and "system has" duality. |
11 |
|
12 |
An idea that seems to be viable is to have the USE flags very much like |
13 |
the "vitual provides" of some ebuilds, i.e., there would be two files: one |
14 |
with the USE flags that "user wants" which I'll call "use.wants" and other |
15 |
with the USE flags that have been already satisfied, which I'll call |
16 |
"use.has". |
17 |
|
18 |
When a user installs the first time Gentoo he would find a default |
19 |
"use.wants" (an automatically generated file from parsing all ebuilds) |
20 |
including a brief description. Something like: |
21 |
|
22 |
use.wants: |
23 |
#flag description |
24 |
|
25 |
gnome The GNOME desktop manager |
26 |
kde The K Desktop Environment |
27 |
|
28 |
we would uncomment what we wants, and comment what we doesn't want. |
29 |
|
30 |
At this time "use.has" would be empty, as the system has the bare minimum. |
31 |
By typing e.g., "emerge --use", emerge would install every ebuild which |
32 |
provided what was specified in "use.has" and wasn't already in "use.has". |
33 |
|
34 |
Everytime the user installed a package that provided some USE flag, emerge |
35 |
would update "use.has" accordingly. If by some reason the user wanted to |
36 |
remove some USE flag from the system he would do, e.g., "emerge --unuse |
37 |
gnome", and emerge would remove the packages that provided gnome and its |
38 |
dependencies, updating both "use.wants" and "use.has". All this after |
39 |
confirming the user intention, of course. |
40 |
|
41 |
This would simplify enormously the first time installation and the |
42 |
maintainance of the USE vars, and best, it would be possible a smooth |
43 |
transition. Each ebuild would just add something like |
44 |
|
45 |
gnome-libs-x.xx.ebuild: |
46 |
... |
47 |
USE_PROVIDE = "gnome" |
48 |
... |
49 |
... |
50 |
get_use() { |
51 |
echo "gnome The GNOME desktop manager" |
52 |
} |
53 |
|
54 |
where the automatically generation of the default "use.wants" would be |
55 |
made by calling "get_use", but initally the ebuilds could just remain as |
56 |
is, and the default "use.wants" would be made by hand, and the |
57 |
USE_PROVIDES would be gradually added. |
58 |
|
59 |
As you can see the USE flags would become very similar to the "virtual |
60 |
provides". I'm not even sure if we could blend these two concepts. |
61 |
|
62 |
|
63 |
I don't know what are the detailed plans for portage2 but I would like to |
64 |
see this proposal considered and discussed. |
65 |
|
66 |
|
67 |
Regards, |
68 |
|
69 |
José Fonseca |
70 |
|
71 |
|
72 |
On 2002.05.22 16:49 Rufiao Valhacouto wrote: |
73 |
> I'd be useful if each ebuild could provide some queries to specify which |
74 |
> USE flags a given package can use, and give some explanations about what |
75 |
> are the end results of using each flag. Also, some kind of 'suggested' |
76 |
> USE flags could be implemented, possibly using some dynamic |
77 |
> configuration hints (eg. if the ebuild detects there is gnome installed, |
78 |
> it can suggest the gnome flag). |
79 |
> |
80 |
> I've seen some proposals for implementing a more effective way to |
81 |
> maintain the USE flags for each package, and it seems for me this is a |
82 |
> must. Anyway, it would be nice if emerge/ebuild could record the USE |
83 |
> flags used in the build process for each package to help in the track of |
84 |
> how everything was compiled. |
85 |
> |