diff options
author | Ismaël Bouya | 2016-03-14 02:39:19 +0100 |
---|---|---|
committer | Ismaël Bouya | 2016-03-14 02:49:17 +0100 |
commit | 7925e5eee3e81544175b7f7d288c96d11c6bc9aa (patch) | |
tree | c291e3f0b1406c95f7f72826057158b27f7eaea6 | |
parent | ff8c1c853c1b200a481e8026898da2a5f0c450d7 (diff) | |
download | aur-7925e5eee3e81544175b7f7d288c96d11c6bc9aa.tar.gz |
Patch urwid_ui to escale shell args
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | 001_fix_shell_escape.patch | 31 | ||||
-rw-r--r-- | PKGBUILD | 10 |
3 files changed, 43 insertions, 6 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Mon Mar 14 01:38:20 UTC 2016 +# Mon Mar 14 01:49:00 UTC 2016 pkgbase = terminal_velocity-git - pkgdesc = A fast note-taking app for the UNIX terminal + pkgdesc = A fast note-taking app for the UNIX terminal (patched) pkgver = 0.96.5667177 - pkgrel = 1 + pkgrel = 2 url = https://github.com/seanh/terminal_velocity arch = any license = GPL @@ -11,7 +11,9 @@ pkgbase = terminal_velocity-git depends = python2-urwid depends = python2-chardet source = git://github.com/seanh/terminal_velocity.git + source = 001_fix_shell_escape.patch sha1sums = SKIP + sha1sums = 7b04f0f28a4801931f7a0e499f5131d5a5c3653c pkgname = terminal_velocity-git diff --git a/001_fix_shell_escape.patch b/001_fix_shell_escape.patch new file mode 100644 index 000000000000..c3c28c3e8cf9 --- /dev/null +++ b/001_fix_shell_escape.patch @@ -0,0 +1,31 @@ +--- a/urwid_ui.py 2016-03-14 02:28:17.425313918 +0100 ++++ b/urwid_ui.py 2016-03-14 02:29:22.807844809 +0100 +@@ -5,6 +5,7 @@ + """ + import subprocess + import shlex ++import pipes + import logging + logger = logging.getLogger(__name__) + +@@ -323,16 +324,16 @@ + + elif key in ["enter"]: + if self.selected_note: +- system(self.editor + ' ' + self.selected_note.abspath, self.loop) ++ system(self.editor + ' ' + pipes.quote(self.selected_note.abspath), self.loop) + else: + if self.search_box.edit_text: + try: + note = self.notebook.add_new(self.search_box.edit_text) +- system(self.editor + ' ' + note.abspath, self.loop) ++ system(self.editor + ' ' + pipes.quote(note.abspath), self.loop) + except notebook.NoteAlreadyExistsError: + # Try to open the existing note instead. +- system(self.editor + ' ' + self.search_box.edit_text + +- self.notebook.extension, ++ system(self.editor + ' ' + pipes.quote(self.search_box.edit_text + ++ self.notebook.extension), + self.loop) + except notebook.InvalidNoteTitleError: + # TODO: Display error message to user. @@ -3,8 +3,8 @@ _pkgname=terminal_velocity pkgname=terminal_velocity-git pkgver=0.96.5667177 -pkgrel=1 -pkgdesc="A fast note-taking app for the UNIX terminal" +pkgrel=2 +pkgdesc="A fast note-taking app for the UNIX terminal (patched)" arch=('any') url="https://github.com/seanh/terminal_velocity" license=('GPL') @@ -12,8 +12,10 @@ depends=("python2-urwid" "python2-chardet") makedepends=('git') source=( 'git://github.com/seanh/terminal_velocity.git' + '001_fix_shell_escape.patch' ) -sha1sums=('SKIP') +sha1sums=('SKIP' + '7b04f0f28a4801931f7a0e499f5131d5a5c3653c') pkgver() { cd "$srcdir/$_pkgname" @@ -21,6 +23,8 @@ pkgver() { } build() { + cd "$srcdir/$_pkgname/$_pkgname" + patch -p1 < ../../001_fix_shell_escape.patch cd "$srcdir/$_pkgname" python2 setup.py build } |