4teamwork/ftw-buildouts — pull request #10 by lukasgraf (2014-03-21 10:03:50+00:00)
Title: Don't try to set zcml-additional from tika-server.cfg

[`tika-server.cfg`](https://github.com/4teamwork/ftw-buildouts/blob/master/tika-server.cfg#L10) currently includes
```ini
[instance0]
zcml-additional += ${tika:zcml}
```
While it's a nice idea that `tika-server.cfg` is completely self-configuring, I don't think this can work reliably:
- `instance0:zcml-additional` often gets overridden in buildouts that extend from the `ftw-buildouts`.
- Because everything in `zcml-additional` needs to be wrapped in a single `` element, appending to it from multiple places using `+=` doesn't work.

Therefore I suggest to remove that `zcml-additional += ${tika:zcml}` and instead document in `README.rst` how to add tika's ZCML to `instance0:zcml-additional` in the buildout that extends from `tika-server.cfg`. That way its left to the developer to make sure the ZCML is included properly in whatever other additional ZCML he has in his buildout.

This issue really should be fixed in `plone.recipe.zope2instance` I guess - always wrap the contents of `zcml-additional` in an outer `` element if it contains more than one element.

As a work-around, we do this in some of our buildouts:

- Define `buildout:zcml-additional-fragments`
- Append to `buildout:zcml-additional-fragments` from multiple places using `+=`
- Wrap its contents in a `` node and set `zcml-additional` to that:

```ini
[instance0]
zcml-additional =

${buildout:zcml-additional-fragments}

```