Commit Graph

5 Commits

Author SHA1 Message Date
Sean Dague 8a9057a4e2 Insert the right content at end of files
Previously the logic around hitting the end of the file without having
found the insertion point didn't account for the fact that you might
be in roughly the right area, and would not need to duplicate the meta
section or section headers.

This takes that into account during the else phase. It will help with
the neutron functional jobs that merge a lot of snippets together.

Change-Id: Ifaa1176e9fdfbc4fdb43192ed2f85e7306823848
2017-02-28 10:25:17 -05:00
Sean Dague de46354ed3 new localrc set strategy
the localrc is really just executable shell, which means there are
tons of edgecases where you can't treat it the same as simple
assignment a=b.

Instead of trying to be smart about things and reduce duplication in
the localrc files, just do the naive thing and stack up all the shell
declarations in order. When evaluated in shell they will end up
stacking up as expected.

Change-Id: I231d130b24b02cdd79618f85472cee21905884e0
2017-02-10 16:57:34 -05:00
Sean Dague 1384ec992d add tests for merging lines beyond a=b
Change-Id: Id2af3b86e19c02fee4058d61e15eb6dd462c6e73
2017-01-19 09:18:11 -05:00
Sean Dague dde87e097f fix dsconf for setting localrc name=value
It's important when setting localrc name=value that there are no
spaces around the = sign, otherwise it doesn't work. Remember to treat
localrc special from the iniset portions.
2017-01-17 10:38:03 -05:00
Sean Dague 3ecd349bfe Fix merge of local.conf add tests 2017-01-17 09:22:18 -05:00