Tested-By: Paulo Vital <pvital(a)linux.vnet.ibm.com>
Reviewed-By: Paulo
Vital <pvital(a)linux.vnet.ibm.com>
On Wed, 2015-08-26 at 14:08 -0300, Lucio Correia wrote:
The debugreports and screenshots generated were being saved to
/var/lib/wok instead of /var/lib/kimchi, due to absence of
plugin-specific state_dir config. This patch adds it.
Now, when the plugin is installed, those files are saved to
/var/lib/<plugin_name>, and, when running from source, to
plugins/<plugin_name>/data.
That also affects Ginger, which backups are now saved to
/var/lib/ginger/ginger_backups.
Signed-off-by: Lucio Correia <luciojhc(a)linux.vnet.ibm.com>
---
src/wok/config.py.in | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/wok/config.py.in b/src/wok/config.py.in
index 5ffa936..08da028 100644
--- a/src/wok/config.py.in
+++ b/src/wok/config.py.in
@@ -88,10 +88,13 @@ class PluginPaths(Paths):
self.plugin_dir = os.path.join('plugins', name)
if self.installed:
+ self.state_dir = '@localstatedir@/lib/%s' % name
self.conf_dir = '@sysconfdir(a)/wok/plugins.d'
self.src_dir = os.path.join('@wokdir@', self.plugin_dir)
self.mo_dir = '@prefix@/share/locale'
else:
+ self.state_dir =
self.add_prefix(os.path.join(self.plugin_dir,
+ 'data'))
self.conf_dir = self.add_prefix(self.plugin_dir)
self.src_dir = self.add_prefix(self.plugin_dir)
self.mo_dir =
self.add_prefix(os.path.join(self.plugin_dir, 'mo'))