Merge ~kissiel/plainbox:fix-1262898-warns-when-XFG_HOME-RO into plainbox:master
Status: | Merged |
---|---|
Approved by: | Maciej Kisielewski |
Approved revision: | b677f977b500befffc7dc830d60d9224711dec2d |
Merged at revision: | ad28eb7e7ccaf1a378b1c38fc26a1150e2c00b84 |
Proposed branch: | ~kissiel/plainbox:fix-1262898-warns-when-XFG_HOME-RO |
Merge into: | plainbox:master |
Diff against target: |
66 lines (+14/-8) 2 files modified
plainbox/impl/logging.py (+10/-6) plainbox/provider_manager.py (+4/-2) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Paul Larson | Approve | ||
Review via email: mp+336052@code.launchpad.net |
Description of the change
silence EPERM on log_dir when using provider_manager
When plainbox is unable to create log_dir it displays a warning. That logdir is created in XDG_CACHE_HOME which when using debian build systems is not writable. This is not only the case when running plainbox commands, but also when setting up providers.
This patch adds a flag to the logging config that suppresses that warning, and uses it in provider_manager calls.
That warning still pops up when plainbox is called (as in plainbox the command in $PATH). But I'm ignoring it, as calling plainbox directly will soon be disabled.
Fixes: LP:1262898
To test it I created a dir with mode "uog-w" and pointed XDG_CACHE_HOME before running ./manage.py of some provider.
is provider_manager the only place that hits it? I assume this will be enough to stop it during the normal builds, which appears to be the intent of the bug. +1 assuming that's true. Nice cleanup!