revising the scripts

Alexander E. Patrakov patrakov at
Sun Dec 3 21:35:52 PST 2006

Jeremy Huntwork wrote:
> Are you back to your regular routine now?

Yes, and I was working on the MiniCD yesterday (to be discussed in a 
separate thread).

> I wanted to revisit the idea of revising and improving our build 
> scripts. I'm not sure what ideas you may have, but I'm anxious to hear 
> them.

There are some ideas:

1) Drop everything from the main Makefile that isn't really needed 
(e.g., "set +h" from lfsenv, because Make runs each command in a 
separate bash shell).
2) Reduce variable namespace pollution. Ideally, there should be zero 
exports that are not meant to be environment variables.
3) There is a bug that $HOME is set to /root while building /tools. I 
discovered it while building a LiveCD for PPC in qemu using cross-distcc 
(i.e., a private modification to the build scripts, currently not ready 
for merging).

> One thing that occurred to me which might prove helpful, especially 
> when developing the CD, is that we could have the main scripts use a 
> pre-generated tools tarball. We keep the necessary info in the scripts 
> to build the tools, but by default they grab one that we've already 
> built. We only ever need to build tools whenever something is changed 
> that affect them. This should cut down the regular build time by a 
> good deal.

Maybe. I can see this as:

1) the regular "make" command attempts to unpack the tools.tar.bz2 
tarball if it exists.
2) if it doesn't exist, it builds /tools as usual and tars them up.

However, since is fast enough to build a CD nightly, and my 
home computer is slow, I won't see a real improvement. In both cases, I 
can run "make" on just before going to sleep, and find a CD 
there just after waking up.

In short, if this is useful to you, feel free to implement this yourself.

Alexander E. Patrakov

More information about the livecd mailing list