aka. "Why you shouldn't check config/{binary,bootstrap,chroot,common,source} into revision control"
From lurking on conversations on IRC and Googling a bit, it seems that pretty much everyone is still checking the chroot, common, binary (etc.) files into revision control. It's okay, I used to do it too. But it's completely broken and will bite you later. Here's some reasons why: * It's stupendously brittle: % lh_config -d etch % # Oh, etch is ooolde now, I can has new softwarez nao? % sed -i 's|LH_DISTRIBUTION="etch"|LH_DISTRIBUTION="lenny"|' \ config/bootstrap % lh_build [Oops, fails due to trying to use unionfs on lenny] So, you pretty much have to know all the ramifications of altering an option in the config, which almost defeats the point of using a tool like live-helper to begin with. * It's nowhere near portable: % # I'm an amd64 machine.. % lh_config % git init && git add * && git commit -m "I'm killing kittens" % # .. And I'm a sparc. % git clone <directory> % lh_build [Oops, fails as we can't execute amd64 binaries on sparc, the binary filesystem is fat16 and our bootloader is written in x86 assembler, which we can't run.] Many other analoguous combinations exist. * When we add more options, defaults are chosen for you: This is usually fine - most of the newer configuration options have sensible defaults that will play nicely, but if they don't, you're going to have to to spend a non-trivial amount of time diffing a fresh config/ against your current one and running test builds specially for this purpose. Bonus fail if you're trying to bisect a bug in live-helper so have to do this on every iteration. You could run lh_config every so often to pick up these new options, but this is broken in other ways [0]. The solution is to simply make your build script: % rm -f config/{binary,bootstrap,chroot,common,source} % lh_config [your options] % lh_build .. where [your options] are the minimal number of options required to customise your image. Not generating source images and have noticed that's not the default? Don't explicitly disable it. The other directories in config/ can just stay where they are - just setup your RCS to ignore {binary,bootstrap,chroot,common,source} and this will all just work. Regards, /Lamby [0] http://lists.debian.org/debian-live/2008/10/msg00102.html -- ,''`. : :' : Chris Lamb `. `'` [EMAIL PROTECTED] `-
signature.asc
Description: PGP signature