config: read the right config if run from subdir
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Fri, 6 Jul 2012 06:58:06 +0000 (09:58 +0300)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Fri, 14 Nov 2014 12:22:10 +0000 (14:22 +0200)
commitff0194dca032a8074b599d279983353334833be0
tree3daf5cfddf23d06f750907a2484217b0f3aece48
parent293e7e28937cf24dec690510fe011f1ab2e0236c
config: read the right config if run from subdir

A step towards being able to run GBP tools from subdirectories.

Now expands '%(top_dir)s' and '%(git_dir)s' in config file path to root
of the working directory and git metadata directory, respectively.

Also, adds a new method _read_config_file() in preparation for
supporting per-tree config files.

Fixes tests.test_Config: currently the only correct way to define the
config file(s) to be parsed is by using the GBP_CONF_FILES environment
variable.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
gbp/config.py
gbp/scripts/import_dscs.py
tests/test_Config.py