Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Mar 2013 22:23:41 +0100
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        Marco Steinbach <coco@executive-computing.de>
Cc:        FreeBSD Ports Mailing List <freebsd-ports@freebsd.org>
Subject:   Re: OPTIONSng: Overide options in /var/db/ports/*/options ?
Message-ID:  <20130325212341.GC64932@ithaqua.etoilebsd.net>
In-Reply-To: <5150B75F.6030908@executive-computing.de>
References:  <5145B415.80303@executive-computing.de> <5145C9DC.6010300@infracaninophile.co.uk> <5145E47D.4050201@executive-computing.de> <CADLo8399uthkGDPGQv8aV8hdOuBzcsczcdx1tv5KoWAQmCjVFA@mail.gmail.com> <51460B2C.6080500@executive-computing.de> <20130317184927.GF72627@ithaqua.etoilebsd.net> <5146213E.3080005@executive-computing.de> <5150B75F.6030908@executive-computing.de>

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

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

On Mon, Mar 25, 2013 at 09:45:19PM +0100, Marco Steinbach wrote:
> Marco Steinbach wrote on 17.03.2013 21:02:
> > Baptiste Daroussin wrote on 17.03.2013 19:49:
> >> On Sun, Mar 17, 2013 at 07:27:56PM +0100, Marco Steinbach wrote:
> >>> Chris Rees wrote on 17.03.2013 17:15:
> >>>> On 17 Mar 2013 15:45, "Marco Steinbach"=20
> >>>> <coco@executive-computing.de> wrote:
> >>>>> Matthew Seaman wrote on 17.03.2013 14:49:
> >>>>>
> >>>>>> On 17/03/2013 12:16, Marco Steinbach wrote:
> >>>>>>> Hi,
> >>>>>>>
> >>>>>>> is there a way to overide options stored in /var/db/ports/*/optio=
ns,
> >>>>>>> basically getting back the pre-OPTIONSng behaviour of being able =
to
> >>>>>>> overide port options in /etc/make.conf ?
> >>>>>>>
> >>>>>>> Before OPTIONSng was introduced, I was able to specify options in
> >>>>>>> /etc/make.conf (WITHOUT_X11, WITHOUT_CUPS, WITH_MAILHEAD, WITH_SS=
L,
> >>>>>>> WITH_MYSQL, WITH_DOVECOT, ...), which then overode any occurency=
=20
> >>>>>>> of that
> >>>>>>> option in any port (or just specific ones, by e.g. checking=20
> >>>>>>> .CURDIR),
> >>>>>>> regardless of the setting the ports option file contained.
> >>>>>> Find the uniquename of the port[*] (by 'make -V UNIQUENAME') then =
in
> >>>>>> /etc/make.conf
> >>>>>>
> >>>>>> uniquename_SET=3D FOO BAR BAZ
> >>>>>> uniquename_UNSET=3D BLURFL
> >>>>>>
> >>>>>> will override the default settings in that port's Makefile for the=
=20
> >>>>>> FOO,
> >>>>>> BAR, BAZ and BLURFL options.
> >>>>>>
> >>>>>> Note: this won't override any settings you make from an options=20
> >>>>>> dialog.
> >>>>>> Might be a good idea to 'make rmconfig' if you only want to rely on
> >>>>>> /etc/make.conf
> >>>>> [...]
> >>>>>
> >>>>> Exactly my point.  Currently, with OPTIONSng there seems to be no=
=20
> >>>>> way to
> >>>> overide anything in /var/db/ports/*/options.
> >>>>> I find it irritating, that I no longer can be sure about options in
> >>>> /etc/make.conf.  I have to check/reconfigure to make sure.
> >>>>> As much as I like OPTIONSng (especially in combination with
> >>>> dialog4ports), this is one thing I'd very much like OPTIONSng to=20
> >>>> relearn:
> >>>> Enforce options regardless of what's in a ports options file.
> >>>>
> >>>> No, that's a bad idea.  It's more confusing to have options not=20
> >>>> being set
> >>>> that are checked in the OPTIONS dialog.
> >>>>
> >>>> Setting those in make.conf sets defaults, and allows them to be=20
> >>>> overridden
> >>>> in individual ports.
> >>> Let's say I never want CUPS, X11, EXAMPLES and DOCS, regardless of=20
> >>> what I willingly or accidentially configured in an OPTIONS dialog (or=
=20
> >>> is defaulted to in a ports Makefile), either because I didn't=20
> >>> understand the dependancy of a choice, I fat-fingered something or=20
> >>> someone helps me configuring something, and wants to make sure I get=
=20
> >>> it right:
> >>>
> >>> OPTIONS_UNSET_FORCE=3D CUPS X11 EXAMPLES DOCS
> >>>
> >>> Same goes for the complementary case of having options set forcibly,=
=20
> >>> either system-wide or per port:
> >>>
> >>> particularport_SET_FORCE=3D EXAMPLES DOCS
> >>>
> >>> I'd set these in /etc/make.conf, and be done for good.
> >>>
> >>> I have a local patch for that kind of behaviour, but wanted to check=
=20
> >>> for possible alternatives besides the beaten path, before bothering=
=20
> >>> bapt@.
> >>>
> >>
> >> The thing is half of people wants the /var/db/*/options to be the last=
=20
> >> word, the
> >> other half want the behaviour you are exposing, so getting a final=20
> >> word that
> >> will satisfy everyone is hard.
> >=20
> > I think the approach of having a choice between the two by allowing for=
=20
> > a new 'force it down the throat'-mechanism could serve both quite nicel=
y.
> >=20
> > Existing /var/db/*/options files would still be read, but options can b=
e=20
> > forcibly set or unset from /etc/make.conf, overriding the corresponding=
=20
> > options setting in options files.
> >=20
> >> I personnally really dislike /var/db/port/*/options and the dialog :).
> >>
> >> The new option framework has been design to:
> >> 1/ respect the same behaviour has it used to be before:=20
> >> /var/db/port/*/options
> >> has the final word.
> >>
> >> 2/ provide the ability to users to be able to tune the whole system in=
 a
> >> consistent way.
> >>
> >> 3/ provide a way to totally disable the dialog thing (NO_DIALOG) so=20
> >> that you
> >> can't save a option file by mistake.
> >>
> >> What we can probably do in the end is provide a new macro to totally=
=20
> >> in all
> >> cases ignore /var/db/port/*/options.
> >>
> >> Would that satisfy your needs?
> >=20
> > I'll recap the approaches:
> >=20
> > a) Options in /etc/make.conf only take precedence, if no=20
> > /var/db/ports/*/options file exists for a given port
> >=20
> > b) Options in /etc/make.conf always take precedence over options of the=
=20
> > same name read from /var/db/ports/*/options
> >=20
> > c) Options in /etc/make.conf are the only source of wisdom, anything in=
=20
> > /var/db/ports/*/options is ignored
> >=20
> >=20
> > a) is currently in place (*_SET, *_UNSET)
> > b) is what I'd very much like to see added (*_SET_FORCE, *_UNSET_FORCE)
> > c) probably comes closer to what you're suggesting
> >=20
> > I've attached my current workaround for b), where I simply duplicated=
=20
> > parts of your code in bsd.options.mk, adding a new suffix.  Maybe this=
=20
> > further clarifies, what I'm currently missing.
> >=20
> > c) would come in handy, if you'd like to make sure nothing whatsoever=
=20
> > from /var/db/ports/*/options impacts a build.
>=20
>=20
> Baptiste, are you considering b) ?
>=20
> MfG CoCo

I will definitly I need to review you patch and some others I recieved, jus=
t I
need to find time to do it.

Thanks for reminding and for the patch.

regards,
Bapt
>=20

--lMM8JwqTlfDpEaS6
Content-Type: application/pgp-signature

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

iEYEARECAAYFAlFQwF0ACgkQ8kTtMUmk6EwXJgCdHfINVzXRX3JZHZRU8zCLxbtH
pE4AnAjv5U1XoOP0/2pg1ux/RBlQgIvN
=Kvsa
-----END PGP SIGNATURE-----

--lMM8JwqTlfDpEaS6--



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