Gentoo Archives: gentoo-portage-dev

From: Marius Mauch <genone@g.o>
To: gentoo-portage-dev@g.o
Subject: Re: [gentoo-portage-dev] The purpose of USE flags
Date: Tue, 16 Dec 2003 13:59:23
Message-Id: 20031216205911.2e663ddc.genone@gentoo.org
In Reply to: Re: [gentoo-portage-dev] The purpose of USE flags by "Sami Näätänen"
1 On 12/16/03 Sami Näätänen wrote:
2
3 > On Monday 15 December 2003 00:23, Marius Mauch wrote:
4 > > Hi,
5 > >
6 > > personally I really dislike this proposal as it adds a lot of
7 > > complexity for functionality that would rarely be used. Also IMO USE
8 > > flags should not prevent the installation of a package, that's the
9 > > job of masking
10 >
11 > Well at least in current state masking is very poorly implemented.
12 > Besides the system I explined can be used as a tree use flags and thus
13 > it does not make it more complex on teh contrary.
14
15 I should have explained better: I'm not against the tree representation
16 of USE flags, but getting away from binary flags makes things complex.
17
18 > Example using current implementation as the functionality basis:
19 >
20 > Enable all gui USE 'flags'
21 > =use.gui.*
22 > Disable qt USE 'flag'
23 > -use.gui.qt
24 >
25 > So the only thing different is the amount of text and the fact that
26 > one needs to put multiple rows of stuff. But this is more readable
27 > than this:
28 >
29 > USE="X acpi acpi4linux apache2 avi cdr crypt cups debug doc dvb dvd
30 > emacs encode esd examples fbcon flash foomaticdb gd gdbm ggi gif
31 > gphoto2 gpm gps gtk gtk2 imap imlib innodb java joystick jpeg junit
32 > ladcca lcms leim libg++ libwww lirc mad maildir memlimit mikmod mmx
33 > mozilla moznocompose moznoirc moznomail mpeg mpi mule ncurses nls oav
34 > oggvorbis opengl oss pam pdflib perl pic plotutils png postgres python
35 > qt quicktime readline samba scanner sdl slp sse ssl tcpd tetex tiff
36 > truetype wmf x86 xml xml2 xmms xv zlib"
37
38 These settings don't match, if you want to compare different
39 implementations please use examples that match. One problem I see with
40 the tree represenations (and a flag being present in multiple leafs) is
41 an ordering probem. E.g. we have use.gui.gnome.esd (as esd is part of
42 gnome) and use.sound.esd. Now a user has "-use.gui.gnome +use.sound", is
43 esd enabled then or not?
44
45 > And besides the USE 'flags' should be program controlled by default
46 > ala ufed and not in the make.conf.
47
48 Why?
49
50 > Oh and this representation is simply to make it tree like.
51 > Because in my opinion all the stuff has to be in database so these
52 > representations doesn't really matter, does they?
53
54 I agree on the tree representation, but I don't agree on the "everything
55 should be in a database" part. One of the main benefits of a
56 plain-textfile approach is that it's easy to fix, using databases for
57 everything adds another layer of complexity.
58
59 > So we need a preferences program to set the configurations in the
60 > database in this way we can controll multiple Gentoo hosts in single
61 > portage database from single machine.
62 > Now that I have something up from my final idea I can some what
63 > clarify the idea.
64 >
65 > So we have single database where mutiple hosts information can be
66 > stored.
67 >
68 > We have a portage 'daemon' to handle all the database access, package
69 > installation and uninstallation. It doesn't need to be allways in the
70 > background, but it can be launced when something needs it.
71 >
72 > This one daemon controlls the dependency tree calculations etc and can
73 >
74 > compile multiple packages simultaneysly if all their dependencies are
75 > allready installed. Thi ofcourse depends wheter the multiple processes
76 > are allowed or not through SMP and/or distcc and/or openmosix
77 >
78 > So now one could que new packages to the daemon at will and it would
79 > add these to it's dependency tree. The daemon installs new packages to
80 > the tree (It might even be a special graph, if there are packagages
81 > that genuinly can depend on eich other) and installs those packages
82 > that are not meeting the requirements. This way we can also see the
83 > situations where something can't be installed, because something else
84 > doesn't work with certain version of the common dependency of the two
85 > packages.
86
87 Now that's a bit more than your original mail ;)
88
89 > Now a litle more to the portage level. :)
90 >
91 > So the portage daemon would need to be a modular concept to be really
92 > usefull. So here are my hasty propositions to be as the modules.
93 >
94 > 1. Main module, which controls the others. So is kind the current
95 > portage core. And the daemon really is only this the others are
96 > libraries.
97
98 No, the core should do only the initialization of the other modules, and
99 provide an interface to tools, t should not contain any portage
100 functionality itself.
101
102 > 2. Preferences module. Sets all the system options ie what database
103 > and
104 > the database URI to use etc. This is lot like the current
105 > make.profile and some parts of make.conf.
106
107 Ok, we can have different config modules, but IMO text configs should be
108 the default.
109
110 > 3. Database handling. This should be so that there can be one for
111 > every
112 > database one might use, but of course not all of them made, but
113 > given the possibility to users to make their own. The default
114 > should be a very light weigth solution like flat files. This module
115 > is responsible for database queries and alterings.
116
117 Different modules for portage tree's, package databases and so on, ok.
118 But we still should use text files as default for several reasons:
119 - easier to fix
120 - less dependencies
121 - current mirror system is based on textfiles, I don't know how
122 easy/hard it is to get the mirrors switched to a new scheme
123
124 > 4. Build module. This builds a package in isolated environment
125
126 ok
127
128 > 5. Install/uninstall module, which handles the file altering in the
129 > live system.
130
131 ok
132
133 > Ebuilds wouldn't anymore be a shell scripts, but the build module will
134 > offer all necessary commands to build something. Ebuild will simply be
135 > a command sequence. Same goes for the install module.
136 > This way it can be made more secure and easier to control.
137
138 Yes and no, part of the ebuild-ng format will be shell commands as I
139 don't see how we can get away from it. Also we'll need a compability
140 module to parse old-style ebuilds as the current 10000 ebuilds or so
141 can't be rewritten over night.
142
143 Marius
144
145 --
146 Public Key at http://www.genone.de/info/gpg-key.pub
147
148 In the beginning, there was nothing. And God said, 'Let there be
149 Light.' And there was still nothing, but you could see a bit better.

Replies

Subject Author
Re: [gentoo-portage-dev] The purpose of USE flags "Sami Näätänen" <sn.ml@××××××××.com>