Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Apr 2024 00:06:02 +0200
From:      =?UTF-8?B?VMSzbA==?= Coosemans <tijl@FreeBSD.org>
To:        Po-Chuan Hsieh <sunpoet@freebsd.org>
Cc:        ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org
Subject:   Re: git: cc9c37d73947 - main - */*: Always use WRK_ENV with SETENVI
Message-ID:  <20240410000602.7450c54d@hal.tijl.coosemans.org>
In-Reply-To: <CAMHz58TnN3k6MCJjuJggDpDrRFxdkYRG04PKZ5On-_xF87E1Ow@mail.gmail.com>
References:  <202403231747.42NHlaRh091094@gitrepo.freebsd.org> <CAMHz58TnN3k6MCJjuJggDpDrRFxdkYRG04PKZ5On-_xF87E1Ow@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 9 Apr 2024 05:15:22 +0800 Po-Chuan Hsieh wrote:
> Hello Tijl,
>=20
> On Sun, Mar 24, 2024 at 1:47=E2=80=AFAM Tijl Coosemans <tijl@freebsd.org>=
 wrote:
>=20
>> The branch main has been updated by tijl:
>>
>> URL:
>> https://cgit.FreeBSD.org/ports/commit/?id=3Dcc9c37d73947e0184f66f0b5fa3f=
c021f7fdf51c
>>
>> commit cc9c37d73947e0184f66f0b5fa3fc021f7fdf51c
>> Author:     Tijl Coosemans <tijl@FreeBSD.org>
>> AuthorDate: 2024-03-23 17:35:13 +0000
>> Commit:     Tijl Coosemans <tijl@FreeBSD.org>
>> CommitDate: 2024-03-23 17:45:45 +0000
>>
>>     */*: Always use WRK_ENV with SETENVI
>>
>>     WRK_ENV contains environment variables like OSVERSION and UNAME_* th=
at
>>     are needed when cross-building packages using Poudriere for a differ=
ent
>>     version of FreeBSD or a different architecture than that of the host
>>     system. =20
>=20
>=20
> It's just my 2 cents.
>=20
> If SETENVI and WRK_ENV always come together, it would be better to have a
> new knob for it (e.g. SET_BASIC_ENV, SET_COMMON_ENV or SET_MIN_ENV).
> Therefore we won't use only part of them. The side benefit is it's
> shorter.

Sure, no objection.  Maybe make it even shorter, e.g. DO_WRK.

SETENVI and WRK_ENV don't always go together.  There are a few existing
cases of ${SETENV} -i in the tree that could be replaced with ${SETENVI}
without ${WRK_ENV}.

> Since WRK_ENV contains a minimal set of common environment variables,
> could we rename it to a more intuitive name such as COMMON_ENV or
> something like that?

It's called WRK_ENV because it's tied to WRKDIR.  It should be used
to run upstream commands/scripts in WRKDIR and only for that purpose.
Also, it won't necessarily stay minimal.  There's quite a bit of
duplication between CONFIGURE_ENV and MAKE_ENV much of which could be
moved to WRK_ENV.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20240410000602.7450c54d>