This inserts trailing whitespace after `COMPONENTS` and after the last package, we should avoid that. Do something like this:

```python
components = ' COMPONENTS\n  %s' % '\n  '.join(package_template.catkin_deps)
```

I think that is right, but you should check it, but the expected result should be like this:

```cmake
find_package(catkin.REQUIRED.COMPONENTS
..bar
..foo
)
```
I replaced the single spaces with `.` for clarity.