Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Aug 2012 17:52:32 +0200
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        Oliver Fromme <olli@lurza.secnetix.de>
Cc:        FreeBSD Ports <ports@FreeBSD.org>, Scot Hetzel <swhetzel@gmail.com>, Jase Thew <jase@FreeBSD.org>
Subject:   Re: Question about new options framework (regression?)
Message-ID:  <20120820155232.GB23607@ithaqua.etoilebsd.net>
In-Reply-To: <201207271702.q6RH2G3O063639@lurza.secnetix.de>
References:  <5012B7CF.9020002@FreeBSD.org> <201207271702.q6RH2G3O063639@lurza.secnetix.de>

next in thread | previous in thread | raw e-mail | index | archive | help

--UHN/qo2QbUvPLonB
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Jul 27, 2012 at 07:02:16PM +0200, Oliver Fromme wrote:
>=20
> Jase Thew wrote:
>  > On 27/07/2012 10:41, Baptiste Daroussin wrote:
>  > >=20
>  > > I think that is the more reasonnable, I'll add this when fully back.=
 I was
>  > > thinking of LATE_SET and LATE_UNSET but OVERRIDE_SET and OVERRIDE_UN=
SET sounds
>  > > better to me.
>  >=20
>  > What use-case are you thinking of that requires the ability for saved
>  > config to override manually specified config? If there isn't a
>  > compelling reason for this, then I'd personally much rather see the
>  > original behaviour restored rather than adding another two variables.
>=20
> Baptiste is right ...  The original behaviour is flawed,
> because it depends on how the port's maintainer wrote the
> Makefile.
>=20
> For example, If you have WITH_FOO=3DYES in the options file,
> and the port's Makefile checks whether WITH_FOO is set or
> unset, then there is *no* way to override that, not even
> with the old options framework.
>=20
> In the case of zsh I was lucky, because the (old) Makefile
> checked if WITH_ZSH_STATIC is set, while the options file
> contained WITHOUT_ZSH_STATIC, so I could override that.
> If it was checking whether WITHOUT_ZSH_STATIC was unset,
> it wouldn't have worked.
>=20
> Also, if I wanted to do it the other way round, i.e. set
> WITH_ZSH_STATIC in the options file, there would be no
> way to unset that on the command line.
>=20
> So, Baptiste's approach to fix that alltogether is right,
> in my opinion.
>=20
> Best regards
>    Oliver
>=20

Does this patch fits your needs?
http://people.freebsd.org/~bapt/OVERRIDE_BLA.diff

The initial configuration has been saved using make config.

# make showconfig
=3D=3D=3D> The following configuration options are available for zsh-5.0.0:
     DEBUG=3Doff: Install debug symbols
     DOCS=3Doff: Build and install the documentation
     GDBM=3Don: Enable GDBM support (GPL)
     MAILDIR=3Don: Enable support for Maildirs in MAIL(PATH)
     MEM=3Doff: Enable zsh-mem options
     MULTIBYTE=3Don: multibyte character support
     PCRE=3Doff: Use Perl Compatible Regular Expressions
     SECURE_FREE=3Don: Enable zsh-secure-free
     STATIC=3Doff: Build static executable/libraries
=3D=3D=3D> Use 'make config' to modify these settings
# OVERRIDE_SET=3DDOCS make showconfig
=3D=3D=3D> The following configuration options are available for zsh-5.0.0:
     DEBUG=3Doff: Install debug symbols
     DOCS=3Don: Build and install the documentation
     GDBM=3Don: Enable GDBM support (GPL)
     MAILDIR=3Don: Enable support for Maildirs in MAIL(PATH)
     MEM=3Doff: Enable zsh-mem options
     MULTIBYTE=3Don: multibyte character support
     PCRE=3Doff: Use Perl Compatible Regular Expressions
     SECURE_FREE=3Don: Enable zsh-secure-free
     STATIC=3Doff: Build static executable/libraries
=3D=3D=3D> Use 'make config' to modify these settings
# OVERRIDE_SET=3DDOCS OVERRIDE_UNSET=3DGDBM make showconfig
=3D=3D=3D> The following configuration options are available for zsh-5.0.0:
     DEBUG=3Doff: Install debug symbols
     DOCS=3Don: Build and install the documentation
     GDBM=3Doff: Enable GDBM support (GPL)
     MAILDIR=3Don: Enable support for Maildirs in MAIL(PATH)
     MEM=3Doff: Enable zsh-mem options
     MULTIBYTE=3Don: multibyte character support
     PCRE=3Doff: Use Perl Compatible Regular Expressions
     SECURE_FREE=3Don: Enable zsh-secure-free
     STATIC=3Doff: Build static executable/libraries
=3D=3D=3D> Use 'make config' to modify these settings
#=20


Sorry for having been long on this.

regards,
Bapt

--UHN/qo2QbUvPLonB
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iEYEARECAAYFAlAyXUAACgkQ8kTtMUmk6EweXQCfVhpDrg5CNQNRH+bzuhzOF2xh
rvoAnA9YKymgFdfMnLKcmwJ8muQWM5I+
=jRtH
-----END PGP SIGNATURE-----

--UHN/qo2QbUvPLonB--



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