1 |
hi |
2 |
|
3 |
i just found out about the plan for the portageNG project, and i have |
4 |
some ideas after reading the beginnings of your specification. all |
5 |
mixed, and a bit long, please bear with me. |
6 |
|
7 |
METADATA |
8 |
-------- |
9 |
|
10 |
this is probably one of the most important things as i see it. |
11 |
distributing, patching, compiling source files, is relatively easy to |
12 |
implement, but its all useless if its not easy to modify/extend the |
13 |
actions that will accomplish this. |
14 |
|
15 |
and since those actions will depend in a large part on the metadata they |
16 |
have available, its critical to ensure that as much information as could |
17 |
be required is available to those actions (implemented by plugins). |
18 |
|
19 |
as i see it, this is a nice progression for metadata to take (i've |
20 |
stolen this concept of uPM (http://u-OS.org): |
21 |
|
22 |
you start with your base "specification" file (i.e. .ebuild); residing |
23 |
in /usr/portage or somewhere else. this forms the start of your |
24 |
metadata. as you progress through the various stages of fetching, |
25 |
unpacking, compiling, merging, and so forth, additional things are added |
26 |
to your collection of metadata for the package. at no point should any |
27 |
metadata generated by an action be lost, if it could be useful to a |
28 |
subsequent action. |
29 |
|
30 |
i fully agree with the decision to seperate the stepped metadata from |
31 |
the static. |
32 |
|
33 |
i don't know if seperate files would be desirable though. |
34 |
i'd rather go for the approach where you still have one "specification" |
35 |
for the package, with various sections implementing the "stepped" |
36 |
functionality. |
37 |
|
38 |
i'd love the ability to make a "step" run through a filter though. |
39 |
imagine: using Python or Perl inside your spec file to do the various |
40 |
desired actions. and this Python code having full access to the current |
41 |
set of metadata for the package, and being able to modify it. |
42 |
|
43 |
if you allow that, then you could automagically make a fair set of |
44 |
convenience libraries available to the code. this could increase |
45 |
performance somewhat, as well. i see the main benefit though, being able |
46 |
to execute in-process with the emerge process. |
47 |
|
48 |
i'd also at this early time like to sugggest that the base |
49 |
"specification" file be a custom format, and NOT XML. |
50 |
|
51 |
keep all machine-generated metadata, and everything in the backend DB |
52 |
storage after this first file as XML, definitely, but the |
53 |
human-maintained file should not be XML, but completely customized to |
54 |
the Portage metadata needs. |
55 |
|
56 |
let the maintainer wade through the minimum amount of boilerplate crap, |
57 |
to improve maintenance scalability to 100s of thousands of packages, |
58 |
please :) |
59 |
|
60 |
|
61 |
|
62 |
CHANGE TRIGGERS (OR, LET US AND THE USER DO CREATIVE THINGS WHEN SYSTEM |
63 |
CHANGES OCCUR) |
64 |
------------------------------------------------------------------------ |
65 |
|
66 |
another idea, in part from uPM, and in part from Linux-hotplug, is to |
67 |
support rule-based actions when Portage events occur. |
68 |
|
69 |
- the system defines a rule that will fire when installation/removal of |
70 |
files matching a regex occurs. uses? imagine files that need to be |
71 |
registered with some central database (i.e old style X font files). when |
72 |
a package then installs files matching a regex or a specific dir prefix, |
73 |
for example, magically the fonts get registered, WITHOUT REQUIRING ANY |
74 |
ACTION BY THE PACKAGE. i suspect this kind of behaviour can increase |
75 |
maintainability of ebuilds significantly. think of all the actions you |
76 |
now don't have to do explicitly. auto-prelinking! |
77 |
|
78 |
- the user defines a rule: for example, if i have a server in the field, |
79 |
and i want to know when changes occur, like, a package is upgraded, |
80 |
maybe i want that to propagate out via email. |
81 |
|
82 |
for this to work well though, the metadata story from above will have to |
83 |
be well thrashed out so that all the necessary stuff is available to the |
84 |
trigger. so, for example, if a particular package is NOT suited to this |
85 |
kind of auto-stuff (i.e. prelinking), you have that metadata available, |
86 |
and can exclude it from processing. either by some central database of |
87 |
exclusions, or perhaps a tag in its metadata saying it doesn't play well |
88 |
with prelink, for example. |
89 |
|
90 |
|
91 |
BUILD TRIGGERS |
92 |
-------------- |
93 |
|
94 |
roughly the same principle as for triggers can be applied to the actions |
95 |
that participate in cobbling together a package. |
96 |
|
97 |
i think it makes sense to seperate the action of building (which i |
98 |
define to mean the whole fetch, unpack, compile, merge process), with |
99 |
the action of actually doing something that changes the target system. |
100 |
|
101 |
however, i would differentiate between actions which occur when the |
102 |
system is modified (triggers) and actions which occur when a package is |
103 |
being put together, and keep them completely seperate. |
104 |
|
105 |
why? because you typically don't want people to mess with actions that |
106 |
assemble the package, they're system-level actions we've defined to |
107 |
implement the build process, and we're just really re-using roughly the |
108 |
same concept as for triggers to make Portage flexible and its |
109 |
maintainence easy, no? |
110 |
|
111 |
they should be configurable via big knobs in /etc, though. i.e. if GnuPG |
112 |
verification was implemented as a system-level extension to, say, the |
113 |
pre-UNPACK/post-FETCH stages, maybe you want to turn it off. but you, as |
114 |
user, shouldn't modify the extensions available for stages which affect |
115 |
package assembly, otherwise, all bets are off as to Portage working. |
116 |
|
117 |
once again, metadata passed to these extensions should be complete. |
118 |
|
119 |
|
120 |
|
121 |
|
122 |
well, thats my brain dump for now. hopefully it wasn't too long-winded. |
123 |
what do you think? |
124 |
|
125 |
leon |
126 |
|
127 |
|
128 |
-- |
129 |
gentoo-portage-dev@g.o mailing list |