Gentoo Archives: gentoo-portage-dev

From: Michael Tindal <urilith@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] Current portage well designed, but badly used
Date: Sat, 27 Nov 2004 23:48:44
Message-Id: 41A91266.5080804@gentoo.org
In Reply to: [gentoo-portage-dev] Current portage well designed, but badly used by Gustavo Barbieri
1 Gustavo Barbieri wrote:
2
3 >Hello,
4 >
5 >I'm playing with portage and noticed it's well designed, but there are
6 >some mistakes in its usage at the moment. For example:
7 >
8 >Categories are mixed: there is a net-www/apache and net-www/mod_*
9 >(apache modules), but there is a more convenient category www-apache/
10 >for them. This is one example, there are more mistakes. There is any
11 >plan to fix them in next portage releases?
12 >
13 >Some packages use numbering version padded with zero, that's good to
14 >list with shell functions, but it's bad because you can't change them
15 >to numbers and them back to string. For example:
16 >mail-mta/nullmailer-1.00_rc7-r4. If you Convert it to integers, it
17 >becomes 1.0 and you can't map back to the ebuild.
18 >
19 >Portage provides metadata.xml, cool. But it's hardly used :(
20 >metadata.xml seems to provide tags for maintainers, changelogs and
21 >long description, many (most?) packages don't use them.
22 >
23 >
24 All of this you mentioned is really irrelevant to sys-apps/portage, but
25 more relevant to the tree.
26 The categories you mentioned are held resposible by individual
27 maintainers, not the portage team.
28 To see who is responsible for the category/package/ebuild, you use the
29 metadata.xml. Packages dont
30 need to use the metadata.xml directly because it is just that,
31 metadata. It is used to provide the information
32 you just stated, and it serves its purpose well.
33
34 >The portage library is too heavy, complicated and make things slow.
35 >Heavy and complicated I noticed from (trying to) look at the source,
36 >slow by usage. For example:
37 >
38 >time emerge # without parameters
39 >real 0m0.614s
40 >user 0m0.487s
41 >sys 0m0.046s
42 >
43 >time emerge -pv world # 16 packages to be upgraded
44 >real 0m22.664s
45 >user 0m12.423s
46 >sys 0m1.130s
47 >
48 >It's too much, look at debian apt, it's fast. And I can't see why
49 >portage is slow.
50 >Forgive me if I'm wrong, but portage just need to parse
51 >/var/lib/portage/world (237 entries in my case), them for each check
52 >if there is any other version greater than and if so check for
53 >dependencies. Why 22seconds? A hand made take less than 1.
54 >
55 >
56 >
57 You can't compare apt to portage, dont even try to go down this route.
58 Its like comparing apples to lemons.
59 Portage is slow, but it is being fixed. CVS portage for one is a whole
60 lot faster.
61
62 >Also, a brief explanation on why I was playing with portage and some
63 >requests: I'm coding (for fun, no plan to get in a production state)
64 >yet another graphical package manager atop portage with the newbie in
65 >mind. But to achieve my goal I need:
66 >
67 > - a fast portage. Now I'm doing a module to do this for me (see
68 >more above), at least the basics, like get package information,
69 >versions, ... and if possible resolve primary dependencies (just to
70 >show to user in a tab "Dependencies", hidden by default).
71 >
72 > - more meta data, if possible a list of urls to screenshots (most
73 >packages have a screenshots section), if the url links to an html,
74 >provide a threshold of images size to get, so it connects and
75 >downloads every image bigger than it... cached of course.
76 >
77 >
78 This is uncessary and would add extra bloat to the tree, and adds more
79 complexity to our dev team.
80 If you want something like this your best bet would be to provide a
81 patch for its functionality on
82 bugs.gentoo.org, but I wouldnt be surprised if it wasnt accepted.
83
84 > - portage to act as a daemon, queue requests and fetch packages.
85 >If portage could be a daemon with 3 threads: one that download
86 >packages, one that compiles and one to manage the other and accept
87 >requests; then it could schedule download to maximize download
88 >throughput, downloading smaller packages first while respecting
89 >dependencies, compile while download and wait until packages are there
90 >and the "emerge" command just send commands to it. It would be handy
91 >since compiling times are huge.
92 >
93 >
94 There is a daemonized ebuild.sh (correct me if I'm wrong ferringb) in
95 portage CVS, although it
96 doesnt use threads, because there is no way to kill processes (wget,
97 etc.) spawned from within
98 a thread, so youd have stale processes after Ctrl+C'ing portage.
99
100 >About the fast portage: I know portage is a complex monster and is the
101 >heart of gentoo, if it breaks, everything breaks. But how about a
102 >python module to be used by other packages that just want to view the
103 >portage and its packages. If eventually this module works as expected
104 >and have every current portage feature, it could replace the old one.
105 >
106 >
107 Jstubbs is working on an api that will make its way into a later
108 revision of portage. As far as parsing
109 ebuilds, they are sourced directly from bash.
110
111 --
112 Michael Tindal (urilith)
113 Gentoo Linux Developer
114 python | dotnet | apache
115
116 -- The best way to create is to destroy.
117
118
119 --
120 gentoo-portage-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-portage-dev] Current portage well designed, but badly used Gustavo Barbieri <barbieri@×××××.com>