standalone: fix support of recursive slapos
When having more than one read_only_shared_part_list, the template was first rendered with indentation and then dedented, but since dedent only remove the common indentation, we ended up with slapos.cfg like this:
$ cat /data/slappart11_testnode/cqg/inst/test0-9/tmp/etc/slapos.cfg [slapos] software_root = /data/slappart11_testnode/cqg/inst/test0-9/tmp/soft instance_root = /data/slappart11_testnode/cqg/inst/test0-9/tmp/inst shared_part_list = /srv/slapgrid/slappart11/srv/shared /srv/slapgrid/slappart11/srv/testnode/cqg/shared /data/slappart11_testnode/cqg/inst/test0-9/tmp/shared master_url = http://10.0.12.198:46312 computer_id = local root_check = False
First dedent, then render the template to prevent this issue. Apply this to other uses of textwrap.dedent for consistency.
The changes were merged into master. The source branch has been removed.
The lesson here was maybe don't generate custom format by hand, if it was XML or json we would never write this using string substitution but use a library ...
I'm checking tests are OK and I'll merge this. This will only be needed once erp5!940 is merged (and on testnodes)
mergedToggle commit list