ppisar pushed to perl-Padre (master). "Fix setting SQLite synchronous level"
notifications at fedoraproject.org
notifications at fedoraproject.org
Fri Jun 26 06:37:31 UTC 2015
From 17791b8d9ab67137cdd01f14854f39779d2456da Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
Date: Fri, 26 Jun 2015 08:27:41 +0200
Subject: Fix setting SQLite synchronous level
diff --git a/Padre-0.90-Change-synchronous-SQLite-level-before-opening-trans.patch b/Padre-0.90-Change-synchronous-SQLite-level-before-opening-trans.patch
new file mode 100644
index 0000000..44275a4
--- /dev/null
+++ b/Padre-0.90-Change-synchronous-SQLite-level-before-opening-trans.patch
@@ -0,0 +1,51 @@
+From ec4256fd6b61119b30ca1ecb9427123b06e77ee3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Fri, 26 Jun 2015 08:18:26 +0200
+Subject: [PATCH] Change synchronous SQLite level before opening transaction
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Since DBD-SQLite-1.48, t/15-locale.t test fails with:
+
+DBD::SQLite::db do failed: Safety level may not be changed inside a transaction
+
+DBD-SQLite-1.48 optimization revealed a bug in Padre::Locker where
+SQLite's pragma synchronous was set after Padre::DBD->begin was
+called.
+
+This patch changes the order of the pragma() and begin() calls to
+conform to SQLite requirements.
+
+<https://github.com/PadreIDE/Padre/issues/17>
+<https://github.com/DBD-SQLite/DBD-SQLite/issues/10>
+
+Signed-off-by: Petr Písař <ppisar at redhat.com>
+---
+ lib/Padre/Locker.pm | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/lib/Padre/Locker.pm b/lib/Padre/Locker.pm
+index 84deab8..7ffa4b4 100644
+--- a/lib/Padre/Locker.pm
++++ b/lib/Padre/Locker.pm
+@@ -97,8 +97,6 @@ sub shutdown {
+ sub db_increment {
+ my $self = shift;
+ unless ( $self->{db_depth}++ ) {
+- Padre::DB->begin;
+-
+ # Database operations we lock on are the most likely to
+ # involve writes. So opportunistically prevent blocking
+ # on filesystem sync confirmation. This should make
+@@ -106,6 +104,7 @@ sub db_increment {
+ # corruption if (and only if) there is a power outage,
+ # operating system crash, or catastrophic hardware failure.
+ Padre::DB->pragma( synchronous => 0 );
++ Padre::DB->begin;
+ }
+ return;
+ }
+--
+2.1.0
+
diff --git a/perl-Padre.spec b/perl-Padre.spec
index 04844cc..2f5cba4 100644
--- a/perl-Padre.spec
+++ b/perl-Padre.spec
@@ -2,7 +2,7 @@
Name: perl-Padre
Version: 0.90
-Release: 16%{?dist}
+Release: 17%{?dist}
Summary: Perl Application Development and Refactoring Environment
License: GPL+ or Artistic
Group: Development/Libraries
@@ -20,6 +20,9 @@ Patch2: Padre-0.90-Disable-Test-NoWarnings-t-01-load.t-tests.patch
Patch3: Padre-0.90-The-text-of-the-error-has-changed-in-perl-5.21.4.-RT.patch
# Fix a precedence issue reported by perl-5.22, bug #1231893
Patch4: Padre-1.00-eliminate-precedence-issue.patch
+# Fix setting SQLite synchronous level, bug #1234733,
+# <https://github.com/PadreIDE/Padre/issues/17>
+Patch5: Padre-0.90-Change-synchronous-SQLite-level-before-opening-trans.patch
BuildArch: noarch
BuildRequires: coreutils
BuildRequires: desktop-file-utils
@@ -320,6 +323,7 @@ in a directory called .padre.
%patch2 -p1
%patch3 -p1
%patch4 -p1
+%patch5 -p1
find share/{examples,templates} -type f \( -name '*.pl' -o -name '*.t' \) \
-exec chmod 755 {} +
@@ -399,6 +403,9 @@ mkdir "$HOME"
%changelog
+* Fri Jun 26 2015 Petr Pisar <ppisar at redhat.com> - 0.90-17
+- Fix setting SQLite synchronous level (bug #1234733)
+
* Thu Jun 18 2015 Petr Pisar <ppisar at redhat.com> - 0.90-16
- Perl 5.22 rebuild
- Modernize spec file
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/perl-Padre.git/commit/?h=master&id=17791b8d9ab67137cdd01f14854f39779d2456da
More information about the perl-devel
mailing list