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:22:49
Message-Id: cea53e3c0603140521jb731103w@mail.gmail.com
In Reply to: Re: [gentoo-portage-dev] Few things, which imho would make portage better by tvali
1 Ok, i send a lot of them, but hopefully they're interesting :)
2
3 I did research a bit about adding SQL support to portage -- as much as
4 i see, mysql is smallest sql server, which could be emerged with
5 python module.
6
7 In beginning, i think that SQL database structure should be created,
8 which supports basic fields from ebuilds (DESCRIPTION, HOMEPAGE,
9 SRC_URI, LICENSE, SLOT, KEYWORDS, IUSE, DEPEND, RDEPEND).
10
11 Then emerge --createsql command should be set up, which adds data from
12 /usr/portage/ filetree into this sql database.
13
14 Then, portage_db files should be copied into new folder, where queries
15 will be brought partially into sql. Emerge --usesql should affect
16 sys.path = ["/usr/lib/portage/pym"]+sys.path in emerge.py so that user
17 can control, if she wants to use experimental sql functions. Search
18 and tree-building are first functions, which should get sql-support,
19 as they are slowest.
20
21 Objective of adding sql support would getting portage search and
22 pretend functions fast -- so that all real use of portage would be
23 without long waiting in any place -- only waiting would be in --update
24 command, then, which could be run when noone is nearby.
25
26 I have some questions now:
27 * Where i could find basic ebuild specification?
28 * Where i could find basic portage tree datastructure specification,
29 if there is any?
30 * Does portage have some code documentation for faster learning?
31 (or should i just read the code?)
32
33 I think that i will start with sql support, then go to UI -- as sql
34 support seems to have far more important functionality.
35
36 I would like to build sql table-structure after getting the
37 information and send it into this list here so that you could hek out
38 if it has something missing or poorly optimized. PS. i dont like rules
39 of database normalizing, so my strutures usually have some "hacks" in
40 them -- i hope that noone complains about that; normalized structures
41 are just dull and optimized only for dumb-user-human-readability,
42 which is imho not the biggest virtue of software code.
43
44 2006/3/14, tvali <qtvali@×××××.com>:
45 > Another place, where it would be good, is that it could interact well with GUI and it's Apply button.
46 >
47 > Another thing, what would be imho improved, is the speed of following functions:
48 > * emerge -s, emerge -S
49 > They should be cached somehow.
50 >
51 > Also, i think that when speaking about *speed* of portage, which is imho notably slow right now (speed of searching, building trees and so on), sql-support should be considered. In /usr/portage/, i see many folders and files, which tend to contain one or two words, lists of hashes and so on. Actually i see relational database there. With many caches and other optimizations it could be tuned fast, but having SQL doing all that, it would be achieved very simply (maybe it would be a jump to have all linux configurations in one SQL "filesystem"? ...ok, just fantasy:))
52 >
53 > There are several small and simple SQL databases. With such tool, big parts of portage become unnessecary, but it's speed will become much faster. This should be optional if one uses some tiny sql, mysql or big clustered sql with nas and load-balancer, but by default some tiny version of SQL should be built.
54 >
55 > Also, i currently dont see a possibility to see dependency tree of installed package.
56 >
57 >
58 >
59 > 2006/3/14, tvali <qtvali@×××××.com>:
60 > > I did think about some priorities too, so that it could be perfect for me.
61 > >
62 > > It should be possible to add package with a priority. I will give you an use case and explanation how i would use portage.
63 > >
64 > > emerge --justadd kdebase-meta kicker --priority 10
65 > > emerge --justadd kdenetwork-meta kdeutils-meta kdeadmin-meta --priority 9
66 > > emerge --justadd kdeedu-meta kdetoys-meta kdegames-meta kdeartwork-meta --priority 1
67 > > emerge --justadd koffice-meta kdegraphics-meta kdemultimedia-meta --priority 5
68 > > emerge --justadd kdewebdev-meta kdevelop htmltidy kompare cervisia --priority 7
69 > > emerge --justadd kdepim-meta --priority 3
70 > > emerge --justadd kdeaddons-meta kde-meta --priority 20
71 > > emerge --changepriority kdeaddons-meta kde-meta --priority 0
72 > >
73 > > Now, when i run emerge --update, it should:
74 > >
75 > > * Sort packages in such order that packages with highest priority would be installed as soon as possible
76 > > * Start installing
77 > > * If something goes wrong, then skip this package and all, which depend on it. This should be optional, if those, which dont depend on it, but are needed by same package, will stay in their positions (go to end of same priority packages) or go to end.
78 > >
79 > > When i need to use my computer and need much resources, i will press ctrl-c, use it, then start (continue) emerge --update.
80 > >
81 > >
82 > > 2006/3/14, tvali <qtvali@×××××.com>:
83 > >
84 > > > 2006/3/14, Simon Stelling <blubb@g.o>:
85 > > >
86 > > > > tvali wrote:
87 > > > > > * Add package to "world" checking all dependencies, but not emerging
88 > > > > > * Remove package from "world" without unmerging
89 > > > >
90 > > > > Uhm, why would you want that?
91 > > > >
92 > > >
93 > > >
94 > > > On my computer, building takes several hours on some packages. I have used it in such way that it builds in several windows on the same time, but i guess that that's not at all the best practice, especially with some combinations of packages. So i would like to add all packages, seeing all blocks and inter dependencies, then start building when ready (and go out of home, when it builds, and be sure that it will do it's best when i'm away).
95 > > >
96 > > >
97 > > > > > * Save all important messages into file instead of beeping (i may be away
98 > > > > > from home); optionally replay them at end of update
99 > > > >
100 > > > > elog can do this.
101 > > >
102 > > >
103 > > > Will check out.
104 > > >
105 > > >
106 > > > > > * When updating or installing new package, if something goes wrong, still
107 > > > > > emerge other packages, which havent failed packages as dependencies -- in my
108 > > > > > case, for example, when i do --update, for example, then the fact that
109 > > > > > update of first package fails does not definitely mean that i dont want to
110 > > > > > update others
111 > > > >
112 > > > > --resume
113 > > >
114 > > >
115 > > > I know --resume, but that's not what i meant.
116 > > >
117 > > > Imagine the situation:
118 > > > emerge -p package1 package2
119 > > >
120 > > > part1 (needed by package1)
121 > > > part2 (needed by part3)
122 > > > part3 (needed by package2)
123 > > > part4 (needed by package2)
124 > > > part5 (needed by both package1 and package2)
125 > > > package1
126 > > > package2
127 > > >
128 > > > now i start "emerge package1 package2" and go to work (or sleep or party or sauna).
129 > > >
130 > > > part2 fails -- some bug or misconfiguration.
131 > > >
132 > > > currently it means that when i came back home, i see that part1 is built, but nothing more and 4-5 hours are actually just wasted.
133 > > >
134 > > > There should be a way to have all those built when i came home:
135 > > >
136 > > > part1 (needed by package1)
137 > > > part4 (needed by package2)
138 > > > part5 (needed by both package1 and package2)
139 > > > package1
140 > > >
141 > > > There should be an error message listing all others. Also, i would add them to world and then emerge so that --update would try to emerge them again, asking me about all previously failed packages when i start it, if i want to retry this time (yes, no, all, none).
142 > > >
143 > > >
144 > > > > --
145 > > > > Kind Regards,
146 > > > >
147 > > > > Simon Stelling
148 > > > > Gentoo/AMD64 Developer
149 > > > > --
150 > > > > gentoo-portage-dev@g.o mailing list
151 > > > >
152 > > > >
153 > > >
154 > > >
155 > > >
156 > > >
157 > > > --
158 > > > tvali
159 > > > (e-mail: " qtvali@×××××.com"; msn: " qtvali@×××××.com";
160 > > > icq: "317-492-912")
161 > > >
162 > > > Ühe eesti internetifirma lehel kohtasin tsitaati:
163 > > > If you don't do it excellently, dont do it at all. Because if it's not excellent, it won't be profitable or fun, and if you're not in business for fun or profit, what the hell are you doing here?
164 > > > Robert Townsend
165 > >
166 > >
167 > >
168 > >
169 > > --
170 > > tvali
171 > > (e-mail: " qtvali@×××××.com"; msn: "qtvali@×××××.com";
172 > > icq: "317-492-912")
173 > >
174 > > Ühe eesti internetifirma lehel kohtasin tsitaati:
175 > > If you don't do it excellently, dont do it at all. Because if it's not excellent, it won't be profitable or fun, and if you're not in business for fun or profit, what the hell are you doing here?
176 > > Robert Townsend
177 >
178 >
179 >
180 > --
181 > tvali
182 > (e-mail: "qtvali@×××××.com"; msn: "qtvali@×××××.com";
183 > icq: "317-492-912")
184 >
185 > Ühe eesti internetifirma lehel kohtasin tsitaati:
186 > If you don't do it excellently, dont do it at all. Because if it's not excellent, it won't be profitable or fun, and if you're not in business for fun or profit, what the hell are you doing here?
187 > Robert Townsend
188
189
190
191 --
192 tvali
193 (e-mail: "qtvali@×××××.com"; msn: "qtvali@×××××.com";
194 icq: "317-492-912")
195
196 Ühe eesti internetifirma lehel kohtasin tsitaati:
197 If you don't do it excellently, dont do it at all. Because if it's not
198 excellent, it won't be profitable or fun, and if you're not in
199 business for fun or profit, what the hell are you doing here?
200 Robert Townsend
201
202 --
203 gentoo-portage-dev@g.o mailing list

Replies