tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: PKGSRC_SETENV?= ${SETENV} -i



David Holland <dholland-pkgtech%netbsd.org@localhost> writes:

> On Tue, Jun 04, 2013 at 08:34:54PM +0200, Thomas Klausner wrote:
>  > > I think that this is very bad idea.
>  > 
>  > I think it's a good idea.
>  > 
>  > Random environment variables may affect configure scripts, and we want
>  > to avoid this as much as possible -- and this is a good step in this
>  > direction.
>
> concur
>
>  > > First, this breaks a lot more than it fixes. PKGSRC_SETENV is
>  > > used in more places than where we want to have "extra" clear
>  > > environment.  In particular, in fetch and extract logic. The
>  > > latter breaks, for instance, installations of all pkgsrc users
>  > > who use HOME or other environment variables to control location
>  > > of DISTDIR and PACKAGES. There exist other cases for users who
>  > > may not need empty environment during building stages.
>  > 
>  > Please use the PACKAGES and DISTFILES variables in /etc/mk.conf if you
>  > really want this.
>
> I suspect he means that if you have
>
> PACKAGES=$(HOME)/pkg/packages
>
> that the $(HOME) may not be evaluated until it's on the wrong side of
> the cleared environment.
>
> However, if this is true it seems like a bug, and also should be
> readily worked around by assigning PACKAGES with the := operator.

If we want to continue with "env -i" then we ought to amend
documentation to use ":=" consistently and send announcement
alerting users that after some change their mk.conf may not
work as it used to.

Or we should find another way that doesn't break user configuration
in _truly_ random fashion.


-- 
BECHA...
   CKOPO CE3OH...



Home | Main Index | Thread Index | Old Index