buildout complains of unused options that are used...

Hi All, I have the following buildout: [buildout] ... zeo_address = 127.0.0.1:2000 ... ... [zeo.conf] recipe = collective.recipe.template input = etc/zeo.conf.in output = etc/zeo.conf ...and buildout complains that the zeo_address line isn't used, except that it is, but collective.recipe.template. What's causing this whine and what should be doing what to mark that option as used? cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk

On Apr 9, 2009, at 4:49 AM, Chris Withers wrote:
Hi All,
I have the following buildout:
[buildout] ... zeo_address = 127.0.0.1:2000 ...
... [zeo.conf] recipe = collective.recipe.template input = etc/zeo.conf.in output = etc/zeo.conf
...and buildout complains that the zeo_address line isn't used, except that it is, but collective.recipe.template.
I see no evidence that it is being used. It's not being used by the configuration code you shared and the recipe source doesnt' seem to use it. Jim -- Jim Fulton Zope Corporation

Jim Fulton wrote:
[buildout] ... zeo_address = 127.0.0.1:2000 ...
... [zeo.conf] recipe = collective.recipe.template input = etc/zeo.conf.in output = etc/zeo.conf
...and buildout complains that the zeo_address line isn't used, except that it is, but collective.recipe.template.
I see no evidence that it is being used. It's not being used by the configuration code you shared and the recipe source doesnt' seem to use it.
Sorry, from zeo.conf.in: %define INSTANCE ${buildout:directory} <zeo> address ${buildout:zeo_address} </zeo> ... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk

On Apr 9, 2009, at 11:34 AM, Chris Withers wrote:
Jim Fulton wrote:
[buildout] ... zeo_address = 127.0.0.1:2000 ...
... [zeo.conf] recipe = collective.recipe.template input = etc/zeo.conf.in output = etc/zeo.conf
...and buildout complains that the zeo_address line isn't used, except that it is, but collective.recipe.template. I see no evidence that it is being used. It's not being used by the configuration code you shared and the recipe source doesnt' seem to use it.
Sorry, from zeo.conf.in:
%define INSTANCE ${buildout:directory}
<zeo> address ${buildout:zeo_address} </zeo> ...
OK. I see what's going on here. The recipe is using a private buildout API to perform substitutions at install time, rather than at initialization time. A buildout recipe should only read data from other sections in the initialization phase, otherwise, buildout doesn't see that the option has been read. That's why buildout is complaining about an unused option. To avoid this, the recipe should perform the substitution in the initialization phase (__init__ call). Jim -- Jim Fulton Zope Corporation
participants (2)
-
Chris Withers
-
Jim Fulton