Date: Thursday, January 12, 2017 @ 23:37:27 Author: heftig Revision: 286180
1.5.16-1 Added: ibus-typing-booster/trunk/0001-Unbreak-sqlite-on-Python-3.6.patch ibus-typing-booster/trunk/PKGBUILD -----------------------------------------+ 0001-Unbreak-sqlite-on-Python-3.6.patch | 79 ++++++++++++++++++++++++++++++ PKGBUILD | 41 +++++++++++++++ 2 files changed, 120 insertions(+) Added: 0001-Unbreak-sqlite-on-Python-3.6.patch =================================================================== --- 0001-Unbreak-sqlite-on-Python-3.6.patch (rev 0) +++ 0001-Unbreak-sqlite-on-Python-3.6.patch 2017-01-12 23:37:27 UTC (rev 286180) @@ -0,0 +1,79 @@ +From 0f8b5572de64a3e1a68d20975dffffadd6452c9a Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" <[email protected]> +Date: Fri, 13 Jan 2017 00:21:52 +0100 +Subject: [PATCH] Unbreak sqlite on Python 3.6 + +Py3.6 changed the transaction behavior; DDL commands like PRAGMA do not +commit open transactions anymore, and since the default for execute() is +to auto-open a transaction, setting the journal_mode fails. + +Changing the isolation_level to None so that transactions aren't opened +anymore is a possible workaround. However, using executescript() seems +like a better idea; it always commits any open transaction first. +--- + engine/tabsqlitedb.py | 42 ++++++++++++++++++++++-------------------- + 1 file changed, 22 insertions(+), 20 deletions(-) + +diff --git a/engine/tabsqlitedb.py b/engine/tabsqlitedb.py +index 4ff7f020ecf9dd40..beac0f82ce3ea885 100755 +--- a/engine/tabsqlitedb.py ++++ b/engine/tabsqlitedb.py +@@ -205,16 +205,17 @@ class tabsqlitedb: + "Connect to the database %(name)s.\n" + %{'name': self.user_db_file}) + self.db = sqlite3.connect(self.user_db_file) +- self.db.execute('PRAGMA encoding = "UTF-8";') +- self.db.execute('PRAGMA case_sensitive_like = true;') +- self.db.execute('PRAGMA page_size = 4096; ') +- self.db.execute('PRAGMA cache_size = 20000;') +- self.db.execute('PRAGMA temp_store = MEMORY;') +- self.db.execute('PRAGMA journal_mode = WAL;') +- self.db.execute('PRAGMA journal_size_limit = 1000000;') +- self.db.execute('PRAGMA synchronous = NORMAL;') +- self.db.execute('ATTACH DATABASE "%s" AS user_db;' +- % self.user_db_file) ++ self.db.executescript(''' ++ PRAGMA encoding = "UTF-8"; ++ PRAGMA case_sensitive_like = true; ++ PRAGMA page_size = 4096; ++ PRAGMA cache_size = 20000; ++ PRAGMA temp_store = MEMORY; ++ PRAGMA journal_mode = WAL; ++ PRAGMA journal_size_limit = 1000000; ++ PRAGMA synchronous = NORMAL; ++ ATTACH DATABASE "%s" AS user_db; ++ ''' % self.user_db_file) + except: + sys.stderr.write( + "Could not open the database %(name)s.\n" +@@ -236,16 +237,17 @@ class tabsqlitedb: + %{'name': self.user_db_file}) + self.init_user_db() + self.db = sqlite3.connect(self.user_db_file) +- self.db.execute('PRAGMA encoding = "UTF-8";') +- self.db.execute('PRAGMA case_sensitive_like = true;') +- self.db.execute('PRAGMA page_size = 4096; ') +- self.db.execute('PRAGMA cache_size = 20000;') +- self.db.execute('PRAGMA temp_store = MEMORY;') +- self.db.execute('PRAGMA journal_mode = WAL;') +- self.db.execute('PRAGMA journal_size_limit = 1000000;') +- self.db.execute('PRAGMA synchronous = NORMAL;') +- self.db.execute('ATTACH DATABASE "%s" AS user_db;' +- % self.user_db_file) ++ self.db.executescript(''' ++ PRAGMA encoding = "UTF-8"; ++ PRAGMA case_sensitive_like = true; ++ PRAGMA page_size = 4096; ++ PRAGMA cache_size = 20000; ++ PRAGMA temp_store = MEMORY; ++ PRAGMA journal_mode = WAL; ++ PRAGMA journal_size_limit = 1000000; ++ PRAGMA synchronous = NORMAL; ++ ATTACH DATABASE "%s" AS user_db; ++ ''' % self.user_db_file) + self.create_tables() + if self.old_phrases: + sqlargs = [] +-- +2.11.0 + Added: PKGBUILD =================================================================== --- PKGBUILD (rev 0) +++ PKGBUILD 2017-01-12 23:37:27 UTC (rev 286180) @@ -0,0 +1,41 @@ +# $Id$ +# Maintainer: Jan Alexander Steffens (heftig) <[email protected]> + +pkgname=ibus-typing-booster +pkgver=1.5.16 +pkgrel=1 +pkgdesc="Predictive input method for the IBus platform" +url="https://fedorahosted.org/ibus-typing-booster/" +arch=(any) +license=(GPL3) +depends=(ibus python-gobject python-dbus python-pyenchant m17n-lib sqlite) +makedepends=(git m17n-db hunspell hunspell-{de,el,en,es,fr,he,hu,it,nl,pl,ro}) +_commit=1127c43096d0c267d7b18cf9c86417b78d7ae61c # master +source=("git+https://git.fedorahosted.org/git/ibus-typing-booster#commit=$_commit" + 0001-Unbreak-sqlite-on-Python-3.6.patch) +sha512sums=('SKIP' + '4c1a6a4789a372f3fb8f9cdb76b3cba75006e2163e48d24bd8e9785700a71eb9db4dad1560f05a9ca1086095de624de5be8f030de837dcfab1d669aef5fce167') + +pkgver() { + cd $pkgname + git describe --tags | sed 's/-/+/g' +} + +prepare() { + cd $pkgname + patch -Np1 -i ../0001-Unbreak-sqlite-on-Python-3.6.patch + autoreconf -fvi +} + +build() { + cd $pkgname + ./configure --prefix=/usr --libexec=/usr/lib/ibus + make +} + +package() { + cd $pkgname + make DESTDIR="$pkgdir" install + gzip --force --best "$pkgdir"/usr/share/$pkgname/data/*.{xml,txt,json} +} + Property changes on: ibus-typing-booster/trunk/PKGBUILD ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property
