[perl-DBD-SQLite] Fix testsuite to run with the latest sqlite (bugs.debian.org/591111).

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



commit acf6c396c24366416725a0b0d1dc32c98b80a94b
Author: Adam Tkac <atkac@xxxxxxxxxx>
Date:   Tue Aug 24 15:35:41 2010 +0200

    Fix testsuite to run with the latest sqlite (bugs.debian.org/591111).
    
    Signed-off-by: Adam Tkac <atkac@xxxxxxxxxx>

 ...-clean-temporary-files-in-child-processes.patch |   49 ++++++++++++++++++++
 perl-DBD-SQLite.spec                               |    7 ++-
 2 files changed, 55 insertions(+), 1 deletions(-)
---
diff --git a/0001-Don-t-clean-temporary-files-in-child-processes.patch b/0001-Don-t-clean-temporary-files-in-child-processes.patch
new file mode 100644
index 0000000..6ef1d4b
--- /dev/null
+++ b/0001-Don-t-clean-temporary-files-in-child-processes.patch
@@ -0,0 +1,49 @@
+From 89c8a661e61bbf0fb1d1e5050262390649e13f2a Mon Sep 17 00:00:00 2001
+From: Niko Tyni <ntyni@xxxxxxxxxx>
+Date: Mon, 23 Aug 2010 08:15:15 +0300
+Subject: [PATCH] Don't clean temporary files in child processes
+
+As of SQLite 3.7.0, write locks try to stat() the database
+file and fail with a 'Disk I/O error' if it is missing. This
+breaks those tests that fork child processes (namely 08_busy.t
+and t/28_schemachange.t) because the child process removes
+the database file in the END block.
+
+The fix is to disable the clean() function for child processes.
+
+See <http://bugs.debian.org/591111>
+---
+ t/lib/Test.pm |    3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/t/lib/Test.pm b/t/lib/Test.pm
+index 80e50ce..8d1be25 100644
+--- a/t/lib/Test.pm
++++ b/t/lib/Test.pm
+@@ -7,6 +7,7 @@ use Exporter   ();
+ use File::Spec ();
+ use Test::More ();
+ 
++my $parent;
+ use vars qw{$VERSION @ISA @EXPORT @CALL_FUNCS};
+ BEGIN {
+ 	$VERSION = '1.29';
+@@ -15,6 +16,7 @@ BEGIN {
+ 
+ 	# Allow tests to load modules bundled in /inc
+ 	unshift @INC, 'inc';
++	$parent = $$;
+ }
+ 
+ # Always load the DBI module
+@@ -22,6 +24,7 @@ use DBI ();
+ 
+ # Delete temporary files
+ sub clean {
++	return if $$ != $parent;
+ 	unlink( 'foo'         );
+ 	unlink( 'foo-journal' );
+ }
+-- 
+1.7.1
+
diff --git a/perl-DBD-SQLite.spec b/perl-DBD-SQLite.spec
index 7c61aad..8f10c0f 100644
--- a/perl-DBD-SQLite.spec
+++ b/perl-DBD-SQLite.spec
@@ -1,6 +1,6 @@
 Name:           perl-DBD-SQLite
 Version:        1.29
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        SQLite DBI Driver
 
 Group:          Development/Libraries
@@ -8,6 +8,7 @@ License:        GPL+ or Artistic
 URL:            http://search.cpan.org/dist/DBD-SQLite/
 Source0:        http://search.cpan.org/CPAN/authors/id/A/AD/ADAMK/DBD-SQLite-%{version}.tar.gz
 patch0:         perl-DBD-SQLite-bz543982.patch
+Patch1:         0001-Don-t-clean-temporary-files-in-child-processes.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 # if sqlite >= 3.1.3 then
@@ -35,6 +36,7 @@ libraries.
 %prep
 %setup -q -n DBD-SQLite-%{version}
 %patch0 -p1
+%patch1 -p1
 
 %build
 CFLAGS="$RPM_OPT_FLAGS" %{__perl} Makefile.PL INSTALLDIRS=vendor
@@ -67,6 +69,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Tue Aug 24 2010 Adam Tkac <atkac redhat com> - 1.29-4
+- fix testsuite to run with the latest sqlite (bugs.debian.org/591111)
+
 * Tue Aug 24 2010 Adam Tkac <atkac redhat com> - 1.29-3
 - rebuild
 
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/perl-devel


[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]
  Powered by Linux