Need better logic for user configuration loading.
@krnowak
Submitted by Krzesimir Nowak Link to original bug (#683959)
Description
Right now this is how Rygel looks for configuration:
- If cmdline parameter for local configuration path is given then: a) Looks for global one in sys config dir (~/usr/etc/rygel.conf in jhbuilded env). b) If global one is found then it looks for local one in path given by cmdline parameter. At this point loading user config is finished.
- Otherwise it looks for global one in sys config dir (~/usr/etc/rygel.conf in jhbuilded env).
- If local is found the it looks for local one in user config dir (~/.config/rygel.conf). At this point loading user config is finished.
If global does not exists then Rygel issues a warning that user configuration could not be loaded. That config actually exists in ~/.config does not matter.
I think that Rygel should do it bit differently:
- Local conf: a) If cmdline param is given then use it to find local conf. b) Otherwise look for it in ~/.config.
- Global conf: a) Look for it in sys conf dir.
If local config is found - use it. Otherwise if global config is found - use it. Otherwise issue a warning about configuration being not found.
Version: git master