New Features for Profiles
zhouhui at wam.umd.edu
Fri Nov 26 11:51:58 PST 2004
On Fri, Nov 26, 2004 at 09:11:57AM -0700, Kevin P. Fleming wrote:
>Jamie Bennett wrote:
>>Implementation wise it would just execute the (download) tags and any
>>(reference) tags inside of (unpack).
>Good luck with that. I've been down that road (mentally) before, and it
>is fraught with complications... here are a few off the top of my head:
>- what if the download element is inside a stage element with a base
>specified? have to execute the stage element too
>- what the stage element to be executed include a user-change to a user
>that hasn't been created yet? or a chroot to a directory that hasn't
>been created yet?
>- if you don't change to the user that the stage requests (if it does
>already exist), then downloading as root may leave the files
>inaccessible to the user who really wants them while the profile runs
>- what if the download element is going to download into a directory
>that will be created by the profile itself?
>See what I mean? Many complications. You could certainly come up with
>some combination of things that may work for the "official" LFS profile,
>but then nALFS would become an "LFS profile tool", not a generic ALFS
>profile tool (I know, that's a fine distinction, but it's still there).
I have been down the road (not with nALFS, but with a perl tool that
I have been worked on). For sure it is not a job within a teabreak,
but it should be manageable within a evening or a weekend assuming the
familiarity with the code base.
The way I did it is a --dry-run option which runs over all the
elememts without actually exec any real command except the download
command. Each handler will be passed with the dryrun option or
replaced with a dry run handler which does nothing for most elements;
For stage, chuser, or chroot, it tracks the default directory or user
inorder to download the package into the correct directory that the
user would desire. I wouldn't deny it is complicate to implement, but
by using seperate handlers, it appears quite clean.
More information about the alfs-discuss