Gentoo Archives: gentoo-portage-dev

From: tvali <qtvali@×××××.com>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] Few things, which imho would make portage better
Date: Tue, 14 Mar 2006 13:51:16
Message-Id: cea53e3c0603140550g361acedbs@mail.gmail.com
In Reply to: Re: [gentoo-portage-dev] Few things, which imho would make portage better by tvali
1 Another question now is about sync.
2
3 I did read somewhere, that this is not good user behavior to sync more
4 than once per day. I understand that as if this is a huge download
5 even if there is nothing changed.
6
7 Isnt it nice idea to have this database just optimized?
8
9 I mean (assuming portage using SQL now) -- that would be really simple
10 to log every change in portage tree as series of SQL queries, which
11 would reproduce this change.
12
13 There could be table, which contains two fields -- Id and query (for
14 example -- in reality, it could be a bit more complex for whatever
15 reason; datetime, for example -- or filename and it's content to
16 support current portage filetree). If i do emerge --sync, then one
17 query could be done, SELECT query FROM updates WHERE Id >
18 LastDownloadedUpdateId ORDER BY Id, then run all queries.
19
20 I guess that in such case, portage --sync would be faster and less
21 server-expensive. I dont know about this cache it builds, but i
22 suppose that this could be made faster, too :)
23
24 Ok, i will work now a bit, but i hope you have time to explain to me,
25 if something i tell here is stupid or not-so-important for whatever
26 reason.
27
28 2006/3/14, tvali <qtvali@×××××.com>:
29 > Thank you much!
30 >
31 > This is what i meant about searching :) Would it be now good to mix
32 > this esearch code with emerge, then adding fields to db and making
33 > emerge treebuilding fast, too? Or is there some utility to emerge,
34 > which does all that?
35 >
36 > 2006/3/14, Devon Miller <devon.c.miller@×××××.com>:
37 > > Try "emerge esearch". Replace "emerge --sync" with "esync", "emerge -s" with
38 > > "esearch", and "emerge -S" with "esearch -S".
39 > > After running "emerge --update ...", run "eupdatedb".
40 > >
41 > > As for dependency tree: "emerge --pretend --tree world"
42 > > Or, to also check additional dependencies: "emerge --deep --pretend --tree
43 > > world"
44 > > And, if you want to see how *everything* relates: "emerge --deep --emptytree
45 > > --pretend --tree"
46 > >
47 > > dcm
48 > >
49 > >
50 > >
51 > > On 3/14/06, tvali <qtvali@×××××.com> wrote:
52 > > >
53 > > > Another place, where it would be good, is that it could interact well with
54 > > GUI and it's Apply button.
55 > > >
56 > > > Another thing, what would be imho improved, is the speed of following
57 > > functions:
58 > > > * emerge -s, emerge -S
59 > > > They should be cached somehow.
60 > > >
61 > > > Also, i think that when speaking about *speed* of portage, which is imho
62 > > notably slow right now (speed of searching, building trees and so on),
63 > > sql-support should be considered. In /usr/portage/, i see many folders and
64 > > files, which tend to contain one or two words, lists of hashes and so on.
65 > > Actually i see relational database there. With many caches and other
66 > > optimizations it could be tuned fast, but having SQL doing all that, it
67 > > would be achieved very simply (maybe it would be a jump to have all linux
68 > > configurations in one SQL "filesystem"? ...ok, just fantasy:))
69 > > >
70 > > > There are several small and simple SQL databases. With such tool, big
71 > > parts of portage become unnessecary, but it's speed will become much faster.
72 > > This should be optional if one uses some tiny sql, mysql or big clustered
73 > > sql with nas and load-balancer, but by default some tiny version of SQL
74 > > should be built.
75 > > >
76 > > > Also, i currently dont see a possibility to see dependency tree of
77 > > installed package.
78 > > >
79 > > >
80 > > >
81 > > > 2006/3/14, tvali < qtvali@×××××.com>:
82 > > > > I did think about some priorities too, so that it could be perfect for
83 > > me.
84 > > > >
85 > > > > It should be possible to add package with a priority. I will give you an
86 > > use case and explanation how i would use portage.
87 > > > >
88 > > > > emerge --justadd kdebase-meta kicker --priority 10
89 > > > > emerge --justadd kdenetwork-meta kdeutils-meta kdeadmin-meta --priority
90 > > 9
91 > > > > emerge --justadd kdeedu-meta kdetoys-meta kdegames-meta kdeartwork-meta
92 > > --priority 1
93 > > > > emerge --justadd koffice-meta kdegraphics-meta kdemultimedia-meta
94 > > --priority 5
95 > > > > emerge --justadd kdewebdev-meta kdevelop htmltidy kompare cervisia
96 > > --priority 7
97 > > > > emerge --justadd kdepim-meta --priority 3
98 > > > > emerge --justadd kdeaddons-meta kde-meta --priority 20
99 > > > > emerge --changepriority kdeaddons-meta kde-meta --priority 0
100 > > > >
101 > > > > Now, when i run emerge --update, it should:
102 > > > >
103 > > > > * Sort packages in such order that packages with highest priority would
104 > > be installed as soon as possible
105 > > > > * Start installing
106 > > > > * If something goes wrong, then skip this package and all, which depend
107 > > on it. This should be optional, if those, which dont depend on it, but are
108 > > needed by same package, will stay in their positions (go to end of same
109 > > priority packages) or go to end.
110 > > > >
111 > > > > When i need to use my computer and need much resources, i will press
112 > > ctrl-c, use it, then start (continue) emerge --update.
113 > > > >
114 > > > >
115 > > > > 2006/3/14, tvali <qtvali@×××××.com>:
116 > > > >
117 > > > > > 2006/3/14, Simon Stelling <blubb@g.o>:
118 > > > > >
119 > > > > > > tvali wrote:
120 > > > > > > > * Add package to "world" checking all dependencies, but not
121 > > emerging
122 > > > > > > > * Remove package from "world" without unmerging
123 > > > > > >
124 > > > > > > Uhm, why would you want that?
125 > > > > > >
126 > > > > >
127 > > > > >
128 > > > > > On my computer, building takes several hours on some packages. I have
129 > > used it in such way that it builds in several windows on the same time, but
130 > > i guess that that's not at all the best practice, especially with some
131 > > combinations of packages. So i would like to add all packages, seeing all
132 > > blocks and inter dependencies, then start building when ready (and go out of
133 > > home, when it builds, and be sure that it will do it's best when i'm away).
134 > > > > >
135 > > > > >
136 > > > > > > > * Save all important messages into file instead of beeping (i may
137 > > be away
138 > > > > > > > from home); optionally replay them at end of update
139 > > > > > >
140 > > > > > > elog can do this.
141 > > > > >
142 > > > > >
143 > > > > > Will check out.
144 > > > > >
145 > > > > >
146 > > > > > > > * When updating or installing new package, if something goes
147 > > wrong, still
148 > > > > > > > emerge other packages, which havent failed packages as
149 > > dependencies -- in my
150 > > > > > > > case, for example, when i do --update, for example, then the fact
151 > > that
152 > > > > > > > update of first package fails does not definitely mean that i dont
153 > > want to
154 > > > > > > > update others
155 > > > > > >
156 > > > > > > --resume
157 > > > > >
158 > > > > >
159 > > > > > I know --resume, but that's not what i meant.
160 > > > > >
161 > > > > > Imagine the situation:
162 > > > > > emerge -p package1 package2
163 > > > > >
164 > > > > > part1 (needed by package1)
165 > > > > > part2 (needed by part3)
166 > > > > > part3 (needed by package2)
167 > > > > > part4 (needed by package2)
168 > > > > > part5 (needed by both package1 and package2)
169 > > > > > package1
170 > > > > > package2
171 > > > > >
172 > > > > > now i start "emerge package1 package2" and go to work (or sleep or
173 > > party or sauna).
174 > > > > >
175 > > > > > part2 fails -- some bug or misconfiguration.
176 > > > > >
177 > > > > > currently it means that when i came back home, i see that part1 is
178 > > built, but nothing more and 4-5 hours are actually just wasted.
179 > > > > >
180 > > > > > There should be a way to have all those built when i came home:
181 > > > > >
182 > > > > > part1 (needed by package1)
183 > > > > > part4 (needed by package2)
184 > > > > > part5 (needed by both package1 and package2)
185 > > > > > package1
186 > > > > >
187 > > > > > There should be an error message listing all others. Also, i would add
188 > > them to world and then emerge so that --update would try to emerge them
189 > > again, asking me about all previously failed packages when i start it, if i
190 > > want to retry this time (yes, no, all, none).
191 > > > > >
192 > > > > >
193 > > > > > > --
194 > > > > > > Kind Regards,
195 > > > > > >
196 > > > > > > Simon Stelling
197 > > > > > > Gentoo/AMD64 Developer
198 > > > > > > --
199 > > > > > > gentoo-portage-dev@g.o mailing list
200 > > > > > >
201 > > > > > >
202 > > > > >
203 > > > > >
204 > > > > >
205 > > > > >
206 > > > > > --
207 > > > > > tvali
208 > > > > > (e-mail: " qtvali@×××××.com"; msn: " qtvali@×××××.com";
209 > > > > > icq: "317-492-912")
210 > > > > >
211 > > > > > Ühe eesti internetifirma lehel kohtasin tsitaati:
212 > > > > > If you don't do it excellently, dont do it at all. Because if it's not
213 > > excellent, it won't be profitable or fun, and if you're not in business for
214 > > fun or profit, what the hell are you doing here?
215 > > > > > Robert Townsend
216 > > > >
217 > > > >
218 > > > >
219 > > > >
220 > > > > --
221 > > > > tvali
222 > > > > (e-mail: " qtvali@×××××.com"; msn: "qtvali@×××××.com";
223 > > > > icq: "317-492-912")
224 > > > >
225 > > > > Ühe eesti internetifirma lehel kohtasin tsitaati:
226 > > > > If you don't do it excellently, dont do it at all. Because if it's not
227 > > excellent, it won't be profitable or fun, and if you're not in business for
228 > > fun or profit, what the hell are you doing here?
229 > > > > Robert Townsend
230 > > >
231 > > >
232 > > >
233 > > > --
234 > > > tvali
235 > > > (e-mail: "qtvali@×××××.com"; msn: " qtvali@×××××.com";
236 > > > icq: "317-492-912")
237 > > >
238 > > > Ühe eesti internetifirma lehel kohtasin tsitaati:
239 > > > If you don't do it excellently, dont do it at all. Because if it's not
240 > > excellent, it won't be profitable or fun, and if you're not in business for
241 > > fun or profit, what the hell are you doing here?
242 > > > Robert Townsend
243 > >
244 > >
245 >
246 >
247 > --
248 > tvali
249 > (e-mail: "qtvali@×××××.com"; msn: "qtvali@×××××.com";
250 > icq: "317-492-912")
251 >
252 > Ühe eesti internetifirma lehel kohtasin tsitaati:
253 > If you don't do it excellently, dont do it at all. Because if it's not
254 > excellent, it won't be profitable or fun, and if you're not in
255 > business for fun or profit, what the hell are you doing here?
256 > Robert Townsend
257 >
258
259
260 --
261 tvali
262 (e-mail: "qtvali@×××××.com"; msn: "qtvali@×××××.com";
263 icq: "317-492-912")
264
265 Ühe eesti internetifirma lehel kohtasin tsitaati:
266 If you don't do it excellently, dont do it at all. Because if it's not
267 excellent, it won't be profitable or fun, and if you're not in
268 business for fun or profit, what the hell are you doing here?
269 Robert Townsend
270
271 --
272 gentoo-portage-dev@g.o mailing list

Replies