An experimental design for (x)alfs
pak_lfs at freemail.gr
pak_lfs at freemail.gr
Sat Nov 26 04:40:06 PST 2005
Subhash Chandra wrote:
> I'm getting a vague idea here. So what it means is that, the ay nALFS
> impliments it(interpreting the commands) wouldn't suffice in order to
> declare differences from the library includes.
Yes, that's correct. You cannot implement inheritance/dynamic
binding/libraries with xincludes.
> The profile has to be
> compiled to include all the differences before it is executed. Is that
> so? or am I again wrong here?
Sorry, I don't know what you mean here. What I 'm saying is that if you e.g.,
wanted a generic 'prepare' stage that would hide most of autotools stuff from
the user and you wanted to implement this in XML, the only reasonable way
to do it is like this:
Then, you would need to write a handler for this tag in C, which would
actually translate arguments and call ./configure etc, etc. The problem
with even this approach (which is what Java's Ant does btw) is that it
forces people to write their 'tag libraries' in C, which I believe almost
nobody will do, leaving this library writing and maintainance to the few
alfs developers (unfair).
Now, imagine XML at a higher level:
<profile name="gcc-pass1" parent="autotools">
Imagine also that it is specified that every string in the 'name' and 'parent'
attributes of a 'profile' must be a directory under
e.g. /var/lib/palfs/profiles and every string in the 'name' attribute of
'stage' must be an executable file there.
Then the alfs team needs write and maintain only *two* handlers:
one for 'profile' and one for 'stage'. The implementation of 'stage'
will just deal with validating that /var/lib/palfs/profiles/gcc-pass1/prepare
exists and is indeed executable. If yes, it will set the environment
with the values in the <param> tags and just launch this 'prepare'
to do the job.
This takes the smarts away from *both* the server *and* the client
and puts them where they belong, i.e., in the profiles.
Of course, going so high-level and having only two tags, means
we can also do away with XML altogether if people don't want
the dependency to an XML library and whatnot.
Is this more clear now?
http://www.freemail.gr - δωρεάν υπηρεσία ηλεκτρονικού ταχυδρομείου.
http://www.freemail.gr - free email service for the Greek-speaking.
More information about the alfs-discuss