Closed TimoWilken closed 11 months ago
Rebased and fixed another issue found by @pzhristov in AliRoot-OCDB. Ready to review/merge now for me.
The feature itself is fine for me. My only worry is that the mangling at:
is not accounted correctly, however I guess we can simply merge this and try it for a bit before we tag it for production.
The feature itself is fine for me. My only worry is that the mangling at:
is not accounted correctly, however I guess we can simply merge this and try it for a bit before we tag it for production.
Ah, I changed that to a proper json.dumps
call, since json
has been built-in to the Python standard library for a long time, and the original way of stringifying a Python dict and replacing the quotes seemed really fragile to me.
With https://github.com/alisw/alibuild/pull/815, that'll be replaced anyway though...
This reduces the duplication in the init.sh generation code significantly.
Instead of generating shell commands that generate init.sh, scattered all over the place, generate the contents of init.sh in one place and just write them into the file when applicable.
Once created, load the generated file instead of generating the same shell code twice at different escaping levels.
All of this reduces the potential for errors a lot, since different places in the code don't need to be kept in sync when generating and re-generating the file.
Add tests that make sure the generated file contents are vaguely sensible, and that clobbering the file during the build (as the AliEn-Runtime package does) does not mean it is mangled during subsequent builds.
This PR requires #818 for the added tox test to work, so I've included that commit here. I'll rebase once that PR is merged.