[Kimchi-devel] [wok] Add specific state_dir values to plugins
Paulo Ricardo Paz Vital
pvital at linux.vnet.ibm.com
Thu Sep 3 21:21:58 UTC 2015
Tested-By: Paulo Vital <pvital at linux.vnet.ibm.com>
Reviewed-By: Paulo
Vital <pvital at 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 at 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@/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'))
More information about the Kimchi-devel
mailing list