Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jun 2012 13:28:26 +0100
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        Baptiste Daroussin <bapt@FreeBSD.org>
Cc:        ports@FreeBSD.org, Michael Scheidell <scheidell@FreeBSD.org>, Ganael LAPLANCHE <martymac@FreeBSD.org>
Subject:   Re: optionsng and tinderbox?
Message-ID:  <4FE1C1EA.8070901@FreeBSD.org>
In-Reply-To: <20120620103412.GB83730@ithaqua.etoilebsd.net>
References:  <4FE12F2D.9080302@FreeBSD.org> <20120620061136.GA79164@ithaqua.etoilebsd.net> <4FE1829D.6030109@FreeBSD.org> <20120620091321.GA83730@ithaqua.etoilebsd.net> <20120620094431.M12775@martymac.org> <20120620103412.GB83730@ithaqua.etoilebsd.net>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig819360C2F8690D64C34DBDED
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 20/06/2012 11:34, Baptiste Daroussin wrote:
> On Wed, Jun 20, 2012 at 09:54:45AM +0000, Ganael LAPLANCHE wrote:
>> On Wed, 20 Jun 2012 11:13:21 +0200, Baptiste Daroussin wrote
>>
>> Hi Baptiste,
>>
>>> make -VUNIQUENAME should show you the right name
>>
>> I have a port where UNIQUENAME is *not* the right prefix to use before=

>> '_SET' for positioning this specific port's options :
>>
>> $ pwd
>> /usr/ports/net/openldap24-client
>>
>> $ make -V UNIQUENAME
>> openldap24-client
>>
>> $ make -V PORT_OPTIONS
>> DOCS EXAMPLES NLS
>>
>> $ make openldap24-client_SET=3DFETCH -V PORT_OPTIONS
>> DOCS EXAMPLES NLS
>>
>> but :
>>
>> $ make openldap24-server_SET=3DFETCH -V PORT_OPTIONS
>> DOCS EXAMPLES FETCH NLS
>>
>> So, here, I have to set the following in make.conf :
>>
>> openldap24-server_SET+=3DFETCH
>>
>> and not :
>>
>> openldap24-client_SET+=3DFETCH
>>
>> which would not work.

> This is about to be fixed by the the uniquename being really unique (se=
e
> matthew@) CFT.

Hmmm... Except my patches make no difference here:

% cd /usr/ports/net/openldap24-client
% make -V UNIQUENAME
openldap24-client
% make -V PORT_OPTIONS
DOCS EXAMPLES NLS
% make openldap24-client_SET=3DFETCH -V PORT_OPTIONS
DOCS EXAMPLES NLS

After looking into this a bit more deeply, there are two different
problems here.

1) Setting ${${UNIQUENAME}_SET} on the command line to override the
settings in OPTIONSFILE -- looks like a logic problem.  bsd.options.mk
sets all the foo_SET options from make.conf or the command line around
line 106:

=2E for opt in ${${UNIQUENAME}_SET}
PORT_OPTIONS+=3D ${opt}
=2E endfor

but then around line 124 it has:

=2Efor opt in ${OPTIONS_FILE_UNSET}
PORT_OPTIONS:=3D  ${PORT_OPTIONS:N${opt}}
=2Eendfor

and if the OPTIONSFILE exists from a previous 'make config' all the
different options are listed in it either in OPTIONS_FILE_UNSET or
OPTIONS_FILE_SET.  Which means OPTIONSFILE overrides make.conf for
*setting* variables.

Shouldn't make.conf / commandline settings override OPTIONSFILE rather
than the other way round?  Seems there's not much point in being able to
set options from make.conf unless that is so, as OPTIONSFILE would be
created more often than not whenever make(1) was invoked in the port's
directory.

2) There is a port-specific problem: the port overrides the OPTIONSFILE
setting, before my patches as a side-effect of setting LATEST_LINK and
specifically preserved in the patch by using the new OPTIONS_DIR variable=
=2E

Before my patches the port had:

% make -V UNIQUENAME -V LATEST_LINK -V OPTIONSFILE
openldap24
openldap24-client
/var/db/ports/openldap24/options
% cd ../openldap24-server
% make -V UNIQUENAME -V LATEST_LINK -V OPTIONSFILE
openldap24
openldap24-server
/var/db/ports/openldap24/options

After patching, it has:

% cd ../openldap24-client
% make -V UNIQUENAME -V LATEST_LINK -V OPTIONSFILE
openldap24-client
openldap24-client
/var/db/ports/openldap24/options
% cd ../openldap24-server
% make -V UNIQUENAME -V LATEST_LINK -V OPTIONSFILE
openldap24-server
openldap24-server
/var/db/ports/openldap24/options

So only the value of UNIQUENAME differs before and after.

However on inspection, openldap24-server and openldap24-client take
different sets of options: -server takes a super-set of -client.  So
having a shared OPTIONSFILE doesn't make sense to me: either the
OPTIONSFILEs have to be different, or -client has to present exactly the
same options as -server, even if most of the settings would not affect
the -client port.

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey




--------------enig819360C2F8690D64C34DBDED
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk/hwfEACgkQ8Mjk52CukIwDJwCcDcImZuutu+6KHlB/fiDnt7Lv
VesAnij9q68gY/BJqeyg8y3HNigHi0Q3
=sXhG
-----END PGP SIGNATURE-----

--------------enig819360C2F8690D64C34DBDED--



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