Re: [gobolinux-devel] [gobolinux-commits] tools/Scripts Makefile bin/UseFlags

2008-02-11 Thread Lucas C. Villa Real
On Feb 8, 2008 6:57 PM, Michael Homer <[EMAIL PROTECTED]> wrote:
> CVSROOT:/sources/goboscripts
> Module name:tools
> Changes by: Michael Homer  08/02/09 02:57:01
>
> Modified files:
> Scripts: Makefile
> Added files:
> Scripts/bin: UseFlags
>
> Log message:
> Initial useflags backing code

Hi! First of all, thanks a lot for this commit! I'm amazed by how
small its implementation actually is -- congrats. I've just 2
questions:

> +   if os.path.exists(goboSettings + '/UseFlags.conf'):
> +   f = open(goboSettings + '/UseFlags.conf')
> +   mergeFlags(flags, f)
> +   f.close()

Could you please commit a skeleton for UseFlags.conf? Something in the
same way as the UserDefinedModules array in $goboSettings/BootOptions
would be enough.

> +   if 'USE' in os.environ:
> +   mergeFlags(flags, os.environ['USE'].split(' '))

Should we ship an empty/commented Resources/Environment file with
Compile just to illustrate how one is expected to define it? I think
it makes sense.

Cheers,

-- 
Lucas
powered by /dev/dsp
___
gobolinux-devel mailing list
gobolinux-devel@lists.gobolinux.org
http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel


Re: [gobolinux-devel] [gobolinux-commits] tools/Scripts Makefile bin/UseFlags

2008-02-11 Thread Lucas C. Villa Real
On Feb 11, 2008 5:58 PM, Michael Homer <[EMAIL PROTECTED]> wrote:
> > > +   if 'USE' in os.environ:
> > > +   mergeFlags(flags, os.environ['USE'].split(' '))
> >
> > Should we ship an empty/commented Resources/Environment file with
> > Compile just to illustrate how one is expected to define it? I think
> > it makes sense.
> I wasn't really considering people setting them that way - the
> environment variable was more for one-time overrides on the command
> line, or testing recipes (`USE="-foo -bar +baz" Compile
> /F/C/LocalRecipes/MyNewRecipe`).
>
> My view was of them layered in this fashion:
> 1) The "system" flags (the ones that are used in building official
> packages, most likely) which would probably be somewhere in
> Scripts/Current/Data. That isn't implemented yet, since I'm not sure
> if it will turn out to be necessary.
> 2) The site-specific flags in /S/S/UseFlags.conf
> 3) The one-shot flags set in the environment or on the command line
> Each level would overwrite flags set in the previous levels.
>
> It would still be good to document the variable somehow, but probably
> not by implying that's how flags should be set overall.

Ok, I see. Ideally that should be documented in the "man page", which
we don't have -- and I don't like too much the idea of polluting
Compile's --help dump with environment variables that affect the
build. Maybe having that listed in the wiki is enough, just like the
NO_UNIONFS var.

-- 
Lucas
powered by /dev/dsp
___
gobolinux-devel mailing list
gobolinux-devel@lists.gobolinux.org
http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel


Re: [gobolinux-devel] [gobolinux-commits] tools/Scripts Makefile bin/UseFlags

2008-02-11 Thread Michael Homer
On Feb 12, 2008 10:58 AM, Lucas C. Villa Real <[EMAIL PROTECTED]> wrote:
> On Feb 8, 2008 6:57 PM, Michael Homer <[EMAIL PROTECTED]> wrote:
> Hi! First of all, thanks a lot for this commit! I'm amazed by how
> small its implementation actually is -- congrats. I've just 2
> questions:
>
> > +   if os.path.exists(goboSettings + '/UseFlags.conf'):
> > +   f = open(goboSettings + '/UseFlags.conf')
> > +   mergeFlags(flags, f)
> > +   f.close()
>
> Could you please commit a skeleton for UseFlags.conf? Something in the
> same way as the UserDefinedModules array in $goboSettings/BootOptions
> would be enough.
Ok, done that.
>
> > +   if 'USE' in os.environ:
> > +   mergeFlags(flags, os.environ['USE'].split(' '))
>
> Should we ship an empty/commented Resources/Environment file with
> Compile just to illustrate how one is expected to define it? I think
> it makes sense.
I wasn't really considering people setting them that way - the
environment variable was more for one-time overrides on the command
line, or testing recipes (`USE="-foo -bar +baz" Compile
/F/C/LocalRecipes/MyNewRecipe`).

My view was of them layered in this fashion:
1) The "system" flags (the ones that are used in building official
packages, most likely) which would probably be somewhere in
Scripts/Current/Data. That isn't implemented yet, since I'm not sure
if it will turn out to be necessary.
2) The site-specific flags in /S/S/UseFlags.conf
3) The one-shot flags set in the environment or on the command line
Each level would overwrite flags set in the previous levels.

It would still be good to document the variable somehow, but probably
not by implying that's how flags should be set overall.
-Michael
___
gobolinux-devel mailing list
gobolinux-devel@lists.gobolinux.org
http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel