Thinking about a change
Ade Lovett
ade at FreeBSD.org
Thu Jan 21 04:42:37 EST 2010
So, I'm thinking about a change to the datastructures to remove a considerable amount of duplicated code, and also add a couple of extra features.
Builds are currently made up of a jail and a portstree. The jail is actually two distinct things, namely a binary tarball, and a src directory from which the binaries are generated.
I'm proposing a change where we implement a new structure, simply called "tree", which contains the source to either a src/ or ports/ tree (basically adding a src/ports flag to the current "portstree" structure, and renaming it.
A jail then becomes a binary distribution, with a pointer to a "tree" (of type 'src').
Benefits:
1. The code to update the src pseudo-tree inside the jail, and the portstree, can be folded into a single object "tree".
2. Currently, if an update to the jail source tree fails, one can end up with a binary tarball that doesn't match the source. A quick check to ensure that "jail->updateTime > jail->tree->updateTime" will ensure consistency (alerts could also be provided in the webui etc.)
3. Optional (but potentially useful). If one is building, say RELENG_8 on amd64 and i386, as things stand, there will be two copies of the source tree by default. One can essentially hack in a shared tree with the srcmount option, but the fact that updateJail performs both a source and binary update can leave things in an inconsistent state. By providing an extra option to createJail that points to an existing tree (type src), one can be assured of consistency by the updateTime checks before.
Backwards compatibility is straightforward enough. Creating a jail without specifying an existing tree merely creates a tree (type src) with the same name.
Thoughts?
-aDe
More information about the tinderbox-list
mailing list