This is an automated email from the git hooks/post-receive script. ross-guest pushed a commit to branch master in repository creepy.
commit 4256892cd1cf046e68739c2342e3e22c6af5a668 Author: Ross Gammon <rossgam...@mail.dk> Date: Sun Nov 30 12:24:24 2014 +0100 Add patch to create projects & temp directories always in ~/.creepy --- debian/patches/05-project-dir.patch | 81 +++++++++++++++++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 82 insertions(+) diff --git a/debian/patches/05-project-dir.patch b/debian/patches/05-project-dir.patch new file mode 100644 index 0000000..b99e69e --- /dev/null +++ b/debian/patches/05-project-dir.patch @@ -0,0 +1,81 @@ +--- creepy.orig/creepy/CreepyMain.py ++++ creepy/creepy/CreepyMain.py +@@ -32,6 +32,7 @@ + from components.VerifyDeleteDialog import VerifyDeleteDialog + from components.UpdateCheckDialog import UpdateCheckDialog + from utilities import GeneralUtilities ++from os.path import expanduser + # set up logging + logger = logging.getLogger(__name__) + logger.setLevel(logging.DEBUG) +@@ -95,10 +96,10 @@ + self.ui = Ui_CreepyMainWindow() + self.ui.setupUi(self) + #Create folders for projects and temp if they do not exist +- if not os.path.exists(os.path.join(os.getcwd(),'projects')): +- os.makedirs(os.path.join(os.getcwd(),'projects')) +- if not os.path.exists(os.path.join(os.getcwd(),'temp')): +- os.makedirs(os.path.join(os.getcwd(),'temp')) ++ if not os.path.exists(os.path.join(expanduser("~/.creepy"),'projects')): ++ os.makedirs(os.path.join(expanduser("~/.creepy"),'projects')) ++ if not os.path.exists(os.path.join(expanduser("~/.creepy"),'temp')): ++ os.makedirs(os.path.join(expanduser("~/.creepy"),'temp')) + self.projectsList = [] + self.currentProject = None + self.ui.webPage = QWebPage() +@@ -610,7 +611,7 @@ + Loads all the existing projects from the storage to be shown in the UI + """ + # Show the existing Projects +- projectsDir = os.path.join(os.getcwd(), 'projects') ++ projectsDir = os.path.join(expanduser("~/.creepy"), 'projects') + projectFileNames = [ os.path.join(projectsDir, f) for f in os.listdir(projectsDir) if (os.path.isfile(os.path.join(projectsDir, f)) and f.endswith('.db'))] + rootNode = ProjectTreeNode(self.trUtf8('Projects')) + for projectFile in projectFileNames: +--- creepy.orig/creepy/models/Project.py ++++ creepy/creepy/models/Project.py +@@ -7,7 +7,7 @@ + # set up logging + logger = logging.getLogger(__name__) + logger.setLevel(logging.DEBUG) +-fh = logging.FileHandler(os.path.join(GeneralUtilities.getLogDir(),'creepy_main.log')) ++fh = logging.FileHandler(os.path.join(GeneralUtilities.getUserHome(),'creepy_main.log')) + fh.setLevel(logging.DEBUG) + formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') + fh.setFormatter(formatter) +--- creepy.orig/creepy/models/ProjectWizardPossibleTargetsTable.py ++++ creepy/creepy/models/ProjectWizardPossibleTargetsTable.py +@@ -41,7 +41,7 @@ + column = index.column() + if role == Qt.DecorationRole: + if column == 1: +- picturePath = os.path.join(os.getcwdu(), 'temp', target['targetPicture']) ++ picturePath = os.path.join(expanduser("~/.creepy"), 'temp', target['targetPicture']) + if picturePath and os.path.exists(picturePath): + pixmap = QPixmap(picturePath) + return QIcon(pixmap.scaled(30, 30, Qt.IgnoreAspectRatio, Qt.FastTransformation)) +@@ -84,4 +84,4 @@ + d = QVariant(self.data(index, Qt.DisplayRole).toString()) + stream << d + mimeData.setData('application/target.tableitem.creepy', encodedData) +- return mimeData +\ No newline at end of file ++ return mimeData +--- creepy.orig/creepy/plugins/twitter/twitter.py ++++ creepy/creepy/plugins/twitter/twitter.py +@@ -60,7 +60,7 @@ + target['targetFullname'] = i.name + #save the pic in the temp folder to show it later + filename = 'profile_pic_%s' % i.id_str +- temp_file = os.path.join(os.getcwd(), "temp", filename) ++ temp_file = os.path.join(expanduser("~/.creepy"), "temp", filename) + #Retieve and save the profile phot only if it does not exist + if not os.path.exists(temp_file): + urllib.urlretrieve(i.profile_image_url, temp_file) +@@ -278,4 +278,4 @@ + return key + return self.labels[key] + +- +\ No newline at end of file ++ diff --git a/debian/patches/series b/debian/patches/series index 5b0c5f9..56b8e11 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ 02-plugin-directory.patch 03-include-dir.patch 04-local-config.patch +05-project-dir.patch -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/creepy.git _______________________________________________ Pkg-grass-devel mailing list Pkg-grass-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel