[creepy] 01/01: Add 02-plugin-directory.patch to make sure plugins in /usr/share/creepy/plugins/ are found.

Petter Reinholdtsen pere at moszumanska.debian.org
Sun Nov 16 20:42:00 UTC 2014


This is an automated email from the git hooks/post-receive script.

pere pushed a commit to branch master
in repository creepy.

commit 1250505e5c0cdde5bc895b69267b5290d2ee8cde
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Sun Nov 16 21:41:53 2014 +0100

    Add 02-plugin-directory.patch to make sure plugins in /usr/share/creepy/plugins/ are found.
---
 debian/changelog                         |  2 ++
 debian/patches/02-plugin-directory.patch | 58 ++++++++++++++++++++++++++++++++
 debian/patches/series                    |  1 +
 3 files changed, 61 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 8b91494..8782d32 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,6 +15,8 @@ creepy (1.2~alpha-1) UNRELEASED; urgency=medium
   * Add new dependency python-qt4 to get GUI working.
   * Add patch 01-log-to-homedir.patch to rewrite log code to log to
     ~/.creepy/, not ~/ or /usr/share/creepy/.
+  * Add 02-plugin-directory.patch to make sure plugins in
+    /usr/share/creepy/plugins/ are found.
 
  -- Andreas Tille <tille at debian.org>  Sun, 16 Feb 2014 11:46:28 +0100
 
diff --git a/debian/patches/02-plugin-directory.patch b/debian/patches/02-plugin-directory.patch
new file mode 100644
index 0000000..eb3dafd
--- /dev/null
+++ b/debian/patches/02-plugin-directory.patch
@@ -0,0 +1,58 @@
+Description: Make sure plugins are found in /usr/share/creepy/plugins/
+Author: Petter Reinholdtsen <pere at hungry.com>
+Forwarded: no
+Reviewed-By: Petter Reinholdtsen <pere at hungry.com>
+Last-Update: 2014-11-16
+
+--- creepy-1.2~alpha.orig/creepy/CreepyMain.py
++++ creepy-1.2~alpha/creepy/CreepyMain.py
+@@ -58,7 +58,7 @@ class MainWindow(QMainWindow):
+         def run(self):
+             pluginManager = PluginManagerSingleton.get()
+             pluginManager.setCategoriesFilter({ 'Input': InputPlugin})
+-            pluginManager.setPluginPlaces([os.path.join(os.getcwd(), 'plugins')])
++            pluginManager.setPluginPlaces(GeneralUtilities.getPluginDirs())
+             pluginManager.locatePlugins()
+             pluginManager.loadPlugins()
+             locationsList = []
+--- creepy-1.2~alpha.orig/creepy/utilities/GeneralUtilities.py
++++ creepy-1.2~alpha/creepy/utilities/GeneralUtilities.py
+@@ -21,6 +21,9 @@ def getLogDir():
+ def reportProblem():
+     webbrowser.open_new_tab('https://github.com/ilektrojohn/creepy/issues')
+     
++def getPluginDirs():
++    return ["/usr/share/creepy/plugins"]
++
+ def calcDistance(lat1, lng1, lat2, lng2):
+     """
+     Calculate the great circle distance between two points 
+--- creepy-1.2~alpha.orig/creepy/components/PluginsConfigurationDialog.py
++++ creepy-1.2~alpha/creepy/components/PluginsConfigurationDialog.py
+@@ -12,7 +12,7 @@ class PluginsConfigurationDialog(QDialog
+         # Load the installed plugins and read their metadata
+         self.PluginManager = PluginManagerSingleton.get()
+         self.PluginManager.setCategoriesFilter({'Input': InputPlugin})
+-        self.PluginManager.setPluginPlaces([os.path.join(os.getcwdu(), 'plugins')])
++        self.PluginManager.setPluginPlaces(GeneralUtilities.getPluginDirs())
+         self.PluginManager.locatePlugins()
+         self.PluginManager.loadPlugins()
+         
+@@ -57,4 +57,4 @@ class PluginsConfigurationDialog(QDialog
+                     config_options['boolean_options'] = boolean_options
+                     plugin = self.PluginManager.getPluginByName(plugin_name, 'Input')
+                     if plugin:
+-                        plugin.plugin_object.saveConfiguration(config_options)
+\ No newline at end of file
++                        plugin.plugin_object.saveConfiguration(config_options)
+--- creepy-1.2~alpha.orig/creepy/components/PersonProjectWizard.py
++++ creepy-1.2~alpha/creepy/components/PersonProjectWizard.py
+@@ -102,7 +102,7 @@ class PersonProjectWizard(QWizard):
+         '''
+         self.PluginManager = PluginManagerSingleton.get()
+         self.PluginManager.setCategoriesFilter({ 'Input': InputPlugin})
+-        self.PluginManager.setPluginPlaces([os.path.join(os.getcwdu(), 'plugins')])
++        self.PluginManager.setPluginPlaces(GeneralUtilities.getPluginDirs())
+         self.PluginManager.locatePlugins()
+         self.PluginManager.loadPlugins()
+         pluginList = sorted(self.PluginManager.getAllPlugins(), key=lambda x: x.name)
diff --git a/debian/patches/series b/debian/patches/series
index 93fcf1f..7987d61 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 01-log-to-homedir.patch
+02-plugin-directory.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/creepy.git



More information about the Pkg-grass-devel mailing list