Merge lp:~terceiro/lava-dispatcher/expose-config-dirs into lp:lava-dispatcher
Status: | Merged |
---|---|
Approved by: | Neil Williams |
Approved revision: | 624 |
Merged at revision: | 626 |
Proposed branch: | lp:~terceiro/lava-dispatcher/expose-config-dirs |
Merge into: | lp:lava-dispatcher |
Diff against target: |
254 lines (+67/-49) 4 files modified
lava/dispatcher/commands.py (+12/-13) lava_dispatcher/config.py (+51/-32) lava_dispatcher/context.py (+1/-2) lava_dispatcher/downloader.py (+3/-2) |
To merge this branch: | bzr merge lp:~terceiro/lava-dispatcher/expose-config-dirs |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Neil Williams | Approve | ||
Review via email: mp+168807@code.launchpad.net |
Description of the change
Refactor handling of configuration directories
The configuration search path is now unconditionally set to:
$HOME/.
${VIRTUAL_
${lava_
If the VIRTUAL_ENV environment variable is not set, then it will read
configuration from /etc/lava-
- The search path is now exposed to client code by the
lava_
- Each individual directory in the search path can be accessed by the variables
user_config_path, system_config_path and default_
- Switched from /etc/xdg/
the previous state of the code, where a specific config_dir was always passed
in and there was no way of overriding it, /etc/xdg/
actually used by anybody, so the risk of this change is zero.
- Removed passing around of configuration directory.
- --config-dir switch in command line tools was kept and has the same behaviour
as before. If a custom config dir is passed, both user and system-wide
directories are ignored, and only the custom directory and the hardcoded
defaults are used.
Thanks Antonio for working on this!
FWIW, +1 from me, it looks good.
One note only: it might be good to update documentation with the new behavior. There are references in doc/QUICKSTART (that is "linked" from the README), plus I guess the docs that will appear on lava.readthedoc s.org. I can manage to do that in case, so I'll start to take a look around this code base.