Date: Sat, 21 Jun 2014 21:41:19 +0200 From: Miroslav Lachman <000.fbsd@quip.cz> To: Marco Steinbach <coco@executive-computing.de> Cc: FreeBSD Ports <ports@freebsd.org> Subject: Re: How can I override global OPTIONS_UNSET for specific port in make.conf? www/xcache Message-ID: <53A5DFDF.1080607@quip.cz> In-Reply-To: <53A56124.7010409@executive-computing.de> References: <53A33F83.7050807@quip.cz> <53A35AE9.8090702@executive-computing.de> <53A37AFD.3060302@executive-computing.de> <53A56124.7010409@executive-computing.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Marco Steinbach wrote: > Marco Steinbach wrote on 20.06.2014 02:06: >> Marco Steinbach wrote on 19.06.2014 23:49: >>> Miroslav Lachman schrieb: >>>> I don't need DOCS, EXAMPLES etc. for each port as I normaly do not >>>> use them on servers. >>>> I have this line in make.conf >>>> >>>> OPTIONS_UNSET= X11 GUI CUPS DOCS EXAMPLES NLS >>>> >>>> Now I need www/xcache port installed with EXAMPLES. >>>> I tried following in make.conf: >>>> >>>> xcache_SET= EXAMPLES >>>> >>>> or >>>> >>>> xcache_SET_FORCE= EXAMPLES >>>> >>>> In both cases, xcache is installed without EXAMPLES. >>>> >>>> So how can I have globally disabled EXAMPLES and enable it only for >>>> one specific port? >>> >>> After some testing, I think this could be a bug in the handling of >>> PORTEXAMPLES / PORTDOCS, since flipping EXAMPLES / DOCS options (and >>> any other options I tried) with these switches works as expected. >>> >>> I'll try and have a go at this. >>> >> >> [...] >> >> If a port does not explicitly define an option for a feature in its >> Makefile, then a port specific setting for that option has no effect, >> since it simply doesn't match against the options defined in the ports >> Makefile. >> >> IOW: If a port does not explicity define an EXAMPLES option, then a >> port specific SET or UNSET for the EXAMPLES option in /etc/make.conf >> has no effect. >> >> Consequently, in the case of www/xcache, simply adding a dummy EXAMPLE >> option to OPTIONS_DEFINE makes xcache_SET_FORCE=EXAMPLES work as >> expected: It installs examples, overriding OPTIONS_UNSET_FORCE. >> >> >> Depending on ones point of view, one could say, that this works as >> advertised. But it's confusing and robs us of port specific _FORCE >> flags in certain cases. >> >> One possible solution could be, to have Mk/bsd.options.mk detect the >> use of PORTEXAMPLES and PORTDOCS in a port, and then silently >> translate these into DOCS / EXAMPLES options (adding them to >> ${COMPLETE_OPTIONS_LIST}), if they're not present. >> >> Without them popping up in a dialog, since that would be the >> maintainers domain, and without persisting them, of course. >> >> I'm still trying to wrap my head around these parts of the ports >> system, though, in order to not accidentially break things. >> >> MfG CoCo >> PS: I'm taking bapt@ out of the loop again, until we're either >> completely stuck or are able to produce a patch. >> >> > > I think I found a more simple way to do this. Could you please try the > attached patch ? I can confirm the success. Tested on FreeBSD 9.3-RC1. With your patch and following lines in make.conf OPTIONS_UNSET= X11 GUI CUPS DOCS EXAMPLES NLS xcache_SET= EXAMPLES examples are installed for xcache port. Thank you very much! I hope it will be accepted by ports mgr and committed soon. Miroslav Lachman
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53A5DFDF.1080607>