diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2012-07-06 09:58:06 +0300 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2014-12-28 13:35:36 +0100 |
commit | ff4cc8bb09574bc28491b11fb90e356eee691961 (patch) | |
tree | d7c2eaf6b7bd54e385b9ee956a068399995196a2 /gbp/scripts | |
parent | e098857ed3511da3c0de917518c6b8972b3f771c (diff) |
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>
Diffstat (limited to 'gbp/scripts')
-rw-r--r-- | gbp/scripts/import_dscs.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gbp/scripts/import_dscs.py b/gbp/scripts/import_dscs.py index 2a71560..5409ca1 100644 --- a/gbp/scripts/import_dscs.py +++ b/gbp/scripts/import_dscs.py @@ -73,8 +73,7 @@ def set_gbp_conf_files(): Filter out all gbp.conf files that are local to the git repository and set GBP_CONF_FILES accordingly so gbp import-dsc will only use these. """ - files = GbpOptionParser.get_config_files() - global_config = [ f for f in files if f.startswith('/') ] + global_config = GbpOptionParser.get_config_files(no_local=True) gbp_conf_files = ':'.join(global_config) os.environ['GBP_CONF_FILES'] = gbp_conf_files gbp.log.debug("Setting GBP_CONF_FILES to '%s'" % gbp_conf_files) |