Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Mar 2004 13:22:28 +0200
From:      Thomas-Martin Seck <tmseck-lists@netcologne.de>
To:        Pav Lucistnik <pav@FreeBSD.org>
Cc:        freebsd-ports@FreeBSD.org
Subject:   Re: treating OPTIONS
Message-ID:  <20040328112228.GA593@laurel.tmseck.homedns.org>
In-Reply-To: <1080436501.75008.5.camel@hood.oook.cz>
References:  <20040327200136.31711.qmail@laurel.tmseck.homedns.org> <1080436501.75008.5.camel@hood.oook.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
* Pav Lucistnik (pav@FreeBSD.org):

> V so, 27. 03. 2004 v 21:01, Thomas-Martin Seck pí¨e:
> 
> > * SADA Kenji <sada@freebsd.org> [gmane.os.freebsd.devel.ports]:
> > 
> > > .if exists(${LOCALBASE}/lib/libldap.so)
> > > WITH_LDAP=      yes
> > > OPTIONS+=       LDAP "Support for LDAP queries" on
> > > .else
> > > OPTIONS+=       LDAP "Support for LDAP queries" off
> > > .endif
> > 
> > Please do not do this. IMHO, ports that autotune themselves are a bad
> > idea and abusing OPTIONS for this is even worse. If you - as the
> > maintainer - decide that LDAP support is optional, default the port to
> > not include it. Period. If the user wants LDAP she can always say so
> > herself, either via the commandline or via 'make config'.
> 
> Why not? This is a common practice that port autodetects optional
> dependencies and automatically enable/disable them.

Unfortunately, yes. I consider it a bad practice. Why? Because most if
not all maintainers who implement this do not do it correctly, i.e. they
do not provide means to override the autodetection. I stumbled over this
when I tested squid's LDAP integration and thus had to install
openldap-client in my build environment. When I installed GPG there to
check signed distfiles, GPG meant it should depend on openldap-client,
too.  And there is no means to turn this off. There are a lot of other
examples in the tree. No, I did not write a PR yet.

Autodetection is not bad as such, but it needs to be overridable and it
should not be allowed to mess with OPTIONS.



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