5 Commits

Author SHA1 Message Date
Ian Wienand
aee18c749b Enforce function declaration format in bash8
Check that function calls look like ^function foo {$ in bash8, and fix
all existing failures of that check.  Add a note to HACKING.rst

Change-Id: Ic19eecb39e0b20273d1bcd551a42fe400d54e938
2014-02-28 07:59:03 +11:00
Isaku Yamahata
bff001456c config: get_meta_section() misunderstands the beginning of metasection
For example, the line, "if [[ -n $no_proxy ]]; then" is misparsed
as the beginning of metasection because get_meta_section() misses
escaping of "|" unlike get_meta_section_files().
This patch adds necessary escape as "|" -> "\|".

Change-Id: Ic14b2ac167037c4f5db89492f0e8a4c5b13c7b6d
Closes-Bug: #1262960
2013-12-20 12:02:39 +09:00
Dean Troyer
2ac8b3f3c2 Fix a couple of INI whitespace bugs
* iniset() bails if no section or option (attribute) is supplied
* merge_config_file() properly skips lines with only whitespace

* Also split the ini-tests into their own script

Bug 1257954

Change-Id: Ie31c5bd0df8dfed129fbcf1e37228aaf25e9305d
2013-12-09 10:30:02 -06:00
Sean Dague
537d4025c5 whitespace cleanup on functions & lib/config
fix some of the bash8 issues found in functions and lib/config,
part of the long march towards fixing all the bash8 issues.

Change-Id: Ia131f64870acb0f9d196fe1a9a45d633abb6fc4d
2013-10-22 12:59:22 -04:00
Dean Troyer
893e66360c Add meta-config via local.conf
This defines a new local.conf file that is designed to take the place of all
of the 'pass-through'[1] configuration options that have been defined in DevStack.

* new local.conf file can contain multiple config file settings to be
  merged in to existing project config files
* localrc can be embedded into local.conf and will auto-extract if
  localrc does not exist
* Adds functions get_meta_section(), get_meta_section_files(),
  merge_config_file() and merge_config_group()
* Adds EXTRA_OPTS, EXTRA_BAREMETAL_OPTS, Q_DHCP_EXTRA_DEFAULT_OPTS and
  Q_SRV_EXTRA_DEFAULT_OPTS to the deprecated warning list at the end of stack.sh

[1] Pass-through options are those that do not configure or change DevStack's behaviour
but simply set a value in a project config file.  This includes most of the EXTRA_XXX_OPTS
configuration variables.

Change-Id: I367cadc86116621e9574ac203aafdab483d810d3
2013-10-11 11:41:58 -05:00