Subject: Re: ${ENV} vs. ${SETENV}
To: J Chapman Flack <>
From: Greg A. Woods <>
List: tech-pkg
Date: 04/15/2005 16:55:47
[ On Sunday, April 10, 2005 at 20:17:17 (-0500), J Chapman Flack wrote: ]
> Subject: Re: ${ENV} vs. ${SETENV} 
> Greg A. Woods wrote:
> > I find it _extremely_ helpful to use something like the following:
> > -SETENV?=	/usr/bin/env
> > +SETENV?=	/usr/bin/env -i
> > 
> > This ensures my well-populated private environment doesn't affect any
> > build in any unexpected way (only the pkgsrc makefiles themselves pay
> Wow ... that seems drastic.

"drastic"  -- hardly.

_NOT_ clearing the environment in a generic build system that drives
other build systems which are themselves inherently susceptible to
environment settings is what's drastic -- drastically error prone!

>  It isn't only pitching non-pkgsrc stuff
> in your environment ... in each individual shell command line that uses
> ${SETENV}, it's pitching *everything that isn't explicitly being added
> to the environment in that line*.  I'm surprised it hasn't given you
> headaches.

On the contrary -- it saves me many headaches; and it's worked
flawlessly for over a year now (though I'm still only caught up to
building 2004Q4 :-)

If you take the time to examine how and where ${SETENV} has been and is
being used you'll find that each occurance sets _exactly_ and _only_ the
necessary values, which means that if one sanely uses '-i' then nothing
gets into the build of the package that's not explicitly supposed to be

						Greg A. Woods

H:+1 416 218-0098  W:+1 416 489-5852 x122  VE3TCP  RoboHack <>
Planix, Inc. <>          Secrets of the Weird <>