the forest through the trees or my $.02

John Schmerge schmerge at speakeasy.net
Tue Jun 26 00:02:48 PDT 2001


Hi everyone,

  Having been reading all the arguments for the various posts involving
the various ways to represent the installation commands, i think people
are going overboard with trying to describe every detail with XML...

WARNING: the following will not be taken well...

  1) the purpose of using xml (contary to popular belief) is not to allow for
portability between platforms or to make data more readable (although it does
help), but to allow a programmer to process data from a well formed file
without having to ever write a parser for that data... alfs could be
designed with a proprietary syntax that's parsed with flex+bison without any
loss of portability provided that the parser module is shared between any
programs or modules that need to pull data out of a profile. Think about it
before responding. All XML buys you is a way of dropping in extensions to the
syntax without having to rewrite the parser module.

  2) Having said that, let me also say that i believe that xml is the right
choice.

  3) i believe it a mistake to veil the underlying syntax of a shell command
by cluttering it with a bunch of tags... we will always have a bourne shell
variant available. Also, we will always have an arsenal of the basic unix
command unless alfs needs to fit on a floppy ;)

  4) unless Linux-From-Scratch is intended to be built from VMS or some other
wacky system... why bother abstracting the commands unless you wish to spend
10 hours a day reading everyone's idea of how to do so.

  5) 99% of the build and installation process occurs from within a makefile
which uses basic unix commands and the bourne shell. (refer to point 3)

  6) the other 1% of commands are used to just get from point a to point b.

  7) the originating format for commands (in the book at least) is as regular
shell commands. I would assume that we don't want to pervert the stuff coming
from the book too much unless we want to have nasty issues with being out of
sync with the lfs-release.

  8) Ask yourself: why is it important to have the profile in xml... the answer
is: so that other programs/modules can understand the data presented in a
profile. The next logical step is to ask: what data would other
programs/modules want to have access to? This question certainly doesn't have
a final answer, but think in terms of it as you plug away with the dtd...

  9) I'd like to see a couple of things added to the profile: namely, the
ability to customize a profile without editing it... configuration options
and make options most specifically.

In liew of the things, i think that the syntax for the pre & post install
commands should be something simple like:

<command>cp -R dir dest</command>

or if you want to go down the route of customization:

<!-- this user data entity could be in another doc -->
<user_data key="cp_options" val="-p"/>

<command>cp -R <user_data key="cp_options"> dir dest</command>

where the '<user_data key="cp_options">' is something that is configurable
by the user and is replaced by whatever the user defines it to be... cp is
probably a bad example of a command, but i think ya'll get the gist of what
i'm trying to convey. I haven't thought too much about the semantics of the
text replace/user_data stuff, but it's an idea that i think has been kind
of overlooked.

So now that i've let all this stuff out, flame away, but truly think about
why you wish to make the command syntax much more complex than it needs to be.

Thanks for not flaming ;)
jbs

-- 
Unsubscribe: send email to alfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message



More information about the alfs-discuss mailing list