Jeremy Huntwork wrote:
Thomas Pegg wrote:

new format might be something similar to gentoo's ebuilds, which in most ways are just shell functions in a text file.


I don't think I've looked that closely at gentoo's files, so I don't know exactly what you mean, but jhalfs employs something that's probably similar. When it extracts the commmands in the book, they end up looking something like this:

#!/bin/sh
set -e

cd $PKGDIR
mkdir -v ../gcc-build
cd ../gcc-build
../gcc-4.0.2/configure --prefix=/tools \
    --with-local-prefix=/tools --disable-nls --enable-shared \
    --enable-languages=c
make bootstrap
make install
ln -vs gcc /tools/bin/cc
exit

The variable PKGDIR is the name of the unpacked directory for that particular package. That variable is set via the unpacking of the

tarball before the above scriptlet is run. If you wanted to have finer control over the build process (like isolating the configure, make and install parts) it would take some rethinking.
Actually an ebuild is a little bit more structured through functions.

It's breaks down like this:
src_unpack - Unpacking and patching, etc here.
src_compile - configure and make
src_install - make install and any other install commands
src_test - commands needed to test a package (not used very often in gentoo)


It may not be real fine grain control, but there is some control there. You can have client tell the server to only run one piece of it at a time especially useful when debugging. Like with Gerard just posted about OpenOffice, the client would just tell the server to run only the src_install function, instead of re-running the whole thing. Now more fine grain control to say run only one command out of the function, would take some more work.

I think it's a good format that gives you control similar to what is currently in the xml based profiles, but without the xml.

Thomas
--
http://linuxfromscratch.org/mailman/listinfo/alfs-discuss
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to