1 |
On Tuesday 16 December 2003 21:59, Marius Mauch wrote: |
2 |
> On 12/16/03 Sami Näätänen wrote: |
3 |
> > |
4 |
> > Well at least in current state masking is very poorly implemented. |
5 |
> > Besides the system I explined can be used as a tree use flags and |
6 |
> > thus it does not make it more complex on teh contrary. |
7 |
> |
8 |
> I should have explained better: I'm not against the tree |
9 |
> representation of USE flags, but getting away from binary flags makes |
10 |
> things complex. |
11 |
|
12 |
And things that doesn't well fit in binary world will be complex if |
13 |
represented in binary. So that's why I would see that makeing something |
14 |
that looks like binary, but can get other values if explicitly added |
15 |
would be best choice. |
16 |
|
17 |
> > Example using current implementation as the functionality basis: |
18 |
> > |
19 |
> > Enable all gui USE 'flags' |
20 |
> > =use.gui.* |
21 |
> > Disable qt USE 'flag' |
22 |
> > -use.gui.qt |
23 |
> > |
24 |
> > So the only thing different is the amount of text and the fact that |
25 |
> > one needs to put multiple rows of stuff. But this is more readable |
26 |
> > than this: |
27 |
> > |
28 |
> > USE="X acpi acpi4linux apache2 avi cdr crypt cups debug doc dvb dvd |
29 |
> > emacs encode esd examples fbcon flash foomaticdb gd gdbm ggi gif |
30 |
> > gphoto2 gpm gps gtk gtk2 imap imlib innodb java joystick jpeg junit |
31 |
> > ladcca lcms leim libg++ libwww lirc mad maildir memlimit mikmod mmx |
32 |
> > mozilla moznocompose moznoirc moznomail mpeg mpi mule ncurses nls |
33 |
> > oav oggvorbis opengl oss pam pdflib perl pic plotutils png postgres |
34 |
> > python qt quicktime readline samba scanner sdl slp sse ssl tcpd |
35 |
> > tetex tiff truetype wmf x86 xml xml2 xmms xv zlib" |
36 |
> |
37 |
> These settings don't match, if you want to compare different |
38 |
> implementations please use examples that match. One problem I see |
39 |
> with the tree represenations (and a flag being present in multiple |
40 |
> leafs) is an ordering probem. E.g. we have use.gui.gnome.esd (as esd |
41 |
> is part of gnome) and use.sound.esd. Now a user has "-use.gui.gnome |
42 |
> +use.sound", is esd enabled then or not? |
43 |
|
44 |
I think this is problem only if the thing is graph. What it is if the |
45 |
flags can be present in many places. |
46 |
|
47 |
> > And besides the USE 'flags' should be program controlled by default |
48 |
> > ala ufed and not in the make.conf. |
49 |
> |
50 |
> Why? |
51 |
|
52 |
Because even at current state these flags are not very self explanatory |
53 |
and thus can make a really big mess to control. I although agree that I |
54 |
am a fan of config files, but only to the point where they are clean an |
55 |
ordered, what the whole punch of use flags simply are not. |
56 |
|
57 |
> > Oh and this representation is simply to make it tree like. |
58 |
> > Because in my opinion all the stuff has to be in database so these |
59 |
> > representations doesn't really matter, does they? |
60 |
> |
61 |
> I agree on the tree representation, but I don't agree on the |
62 |
> "everything should be in a database" part. One of the main benefits |
63 |
> of a plain-textfile approach is that it's easy to fix, using |
64 |
> databases for everything adds another layer of complexity. |
65 |
|
66 |
I would keep a flat file backup, which then could be parsed to the |
67 |
database. This gives the speed and reliability. |
68 |
So one file for the system one for the package tree etc. |
69 |
|
70 |
> > So we need a preferences program to set the configurations in the |
71 |
> > database in this way we can controll multiple Gentoo hosts in |
72 |
> > single portage database from single machine. |
73 |
> > Now that I have something up from my final idea I can some what |
74 |
> > clarify the idea. |
75 |
> > |
76 |
> > So we have single database where mutiple hosts information can be |
77 |
> > stored. |
78 |
> > |
79 |
> > We have a portage 'daemon' to handle all the database access, |
80 |
> > package installation and uninstallation. It doesn't need to be |
81 |
> > allways in the background, but it can be launced when something |
82 |
> > needs it. |
83 |
> > |
84 |
> > This one daemon controlls the dependency tree calculations etc and |
85 |
> > can |
86 |
> > |
87 |
> > compile multiple packages simultaneysly if all their dependencies |
88 |
> > are allready installed. Thi ofcourse depends wheter the multiple |
89 |
> > processes are allowed or not through SMP and/or distcc and/or |
90 |
> > openmosix |
91 |
> > |
92 |
> > So now one could que new packages to the daemon at will and it |
93 |
> > would add these to it's dependency tree. The daemon installs new |
94 |
> > packages to the tree (It might even be a special graph, if there |
95 |
> > are packagages that genuinly can depend on eich other) and installs |
96 |
> > those packages that are not meeting the requirements. This way we |
97 |
> > can also see the situations where something can't be installed, |
98 |
> > because something else doesn't work with certain version of the |
99 |
> > common dependency of the two packages. |
100 |
> |
101 |
> Now that's a bit more than your original mail ;) |
102 |
|
103 |
Yeah sorry that one was just part of my portage dream... :) |
104 |
|
105 |
> > Now a litle more to the portage level. :) |
106 |
> > |
107 |
> > So the portage daemon would need to be a modular concept to be |
108 |
> > really usefull. So here are my hasty propositions to be as the |
109 |
> > modules. |
110 |
> > |
111 |
> > 1. Main module, which controls the others. So is kind the current |
112 |
> > portage core. And the daemon really is only this the others are |
113 |
> > libraries. |
114 |
> |
115 |
> No, the core should do only the initialization of the other modules, |
116 |
> and provide an interface to tools, t should not contain any portage |
117 |
> functionality itself. |
118 |
|
119 |
That I meant. the core was simply a bad choice of word. |
120 |
|
121 |
> > 2. Preferences module. Sets all the system options ie what database |
122 |
> > and |
123 |
> > the database URI to use etc. This is lot like the current |
124 |
> > make.profile and some parts of make.conf. |
125 |
> |
126 |
> Ok, we can have different config modules, but IMO text configs should |
127 |
> be the default. |
128 |
|
129 |
Well I meant more like we could only upgrade this part to suit the needs |
130 |
of possible new modules withouth breaking all the other stuff. |
131 |
and besides I definitely want to use text config files for this. |
132 |
|
133 |
> > 3. Database handling. This should be so that there can be one for |
134 |
> > every |
135 |
> > database one might use, but of course not all of them made, but |
136 |
> > given the possibility to users to make their own. The default |
137 |
> > should be a very light weigth solution like flat files. This |
138 |
> > module is responsible for database queries and alterings. |
139 |
> |
140 |
> Different modules for portage tree's, package databases and so on, |
141 |
> ok. But we still should use text files as default for several |
142 |
> reasons: - easier to fix |
143 |
> - less dependencies |
144 |
> - current mirror system is based on textfiles, I don't know how |
145 |
> easy/hard it is to get the mirrors switched to a new scheme |
146 |
|
147 |
The current sync would be a portage daemon connecting to another one. |
148 |
The way to do it could be simply rsyncing the tree 'backup' and then |
149 |
localy parsing it and making the changes. The only problem is how to |
150 |
make package name/category transitions easily, but that could be made |
151 |
say using package identifiers instead their names as the basis of the |
152 |
package then package transformation would be a simple field change. |
153 |
using say 64 bit integer will give quite many possible packages. :) |
154 |
|
155 |
Default database would be some custom made 'database' using flat files |
156 |
or similar. The alternatives that I would include to the core portage |
157 |
teams shoulders would be berkely DB, postgresgl and mysql. |
158 |
|
159 |
And I would make the flatfile backup system, which could be made when |
160 |
syncing or after bunch of (un)installations. Ofcourse also when asked |
161 |
to backup the system. |
162 |
|
163 |
> > 4. Build module. This builds a package in isolated environment |
164 |
> |
165 |
> ok |
166 |
> |
167 |
> > 5. Install/uninstall module, which handles the file altering in the |
168 |
> > live system. |
169 |
> |
170 |
> ok |
171 |
> |
172 |
> > Ebuilds wouldn't anymore be a shell scripts, but the build module |
173 |
> > will offer all necessary commands to build something. Ebuild will |
174 |
> > simply be a command sequence. Same goes for the install module. |
175 |
> > This way it can be made more secure and easier to control. |
176 |
> |
177 |
> Yes and no, part of the ebuild-ng format will be shell commands as I |
178 |
> don't see how we can get away from it. Also we'll need a compability |
179 |
> module to parse old-style ebuilds as the current 10000 ebuilds or so |
180 |
> can't be rewritten over night. |
181 |
|
182 |
I would put all the stuff to database like this. |
183 |
|
184 |
All dependency and fetching etc info from the ebuilds to database |
185 |
fields. |
186 |
|
187 |
All the building, installation etc functions to database so that every |
188 |
needed function could be a either shell command sequence from the |
189 |
current ebuilds or a new command sequence. These new command sequences |
190 |
can be interpreted differently to make the process more secure and |
191 |
possibly faster. |
192 |
|
193 |
These old-style ebuilds can be parsed to the database. After all we |
194 |
would need a way to make new ebuilds and for that flat file is the |
195 |
simple and efective solution. So we would need to be able to parse |
196 |
theese things to the database any way. |
197 |
|
198 |
One more bonus is that we can put some default command sequences to the |
199 |
database and if those are enough to the package then use one of them. |
200 |
If not write new one. |
201 |
|
202 |
|
203 |
-- |
204 |
gentoo-portage-dev@g.o mailing list |