[perl-DBD-SQLite/f19] Fix tests with sqlite >= 3.8.2

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

 



commit 23d48cf77e812ba09fdf0ffc81132e475f357b60
Author: Petr Písař <ppisar@xxxxxxxxxx>
Date:   Wed Jan 29 10:37:01 2014 +0100

    Fix tests with sqlite >= 3.8.2

 DBD-SQLite-1.41_03-adapt_sqlite_3_8_2.patch |   56 +++++++++++++++++++++++++++
 perl-DBD-SQLite.spec                        |    8 +++-
 2 files changed, 63 insertions(+), 1 deletions(-)
---
diff --git a/DBD-SQLite-1.41_03-adapt_sqlite_3_8_2.patch b/DBD-SQLite-1.41_03-adapt_sqlite_3_8_2.patch
new file mode 100644
index 0000000..a4ec61e
--- /dev/null
+++ b/DBD-SQLite-1.41_03-adapt_sqlite_3_8_2.patch
@@ -0,0 +1,56 @@
+From f8a45b96f62742351c06fd956a4965004df7226d Mon Sep 17 00:00:00 2001
+From: Kenichi Ishigaki <ishigaki@xxxxxxxx>
+Date: Thu, 9 Jan 2014 02:30:37 +0900
+Subject: [PATCH] error messages have been slightly changed since 3.8.2
+
+---
+ t/07_error.t                      | 2 +-
+ t/39_foreign_keys.t               | 4 ++--
+ t/rt_36838_unique_and_bus_error.t | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/t/07_error.t b/t/07_error.t
+index 68ea9ca..cf4fdb1 100644
+--- a/t/07_error.t
++++ b/t/07_error.t
+@@ -28,4 +28,4 @@ eval {
+ };
+ ok($@, 'Statement 2 generated an error');
+ is( $DBI::err, 19, '$DBI::err ok' );
+-like( $DBI::errstr, qr/column a is not unique/, '$DBI::errstr ok' );
++like( $DBI::errstr, qr/column a is not unique|UNIQUE constraint failed/, '$DBI::errstr ok' );
+diff --git a/t/39_foreign_keys.t b/t/39_foreign_keys.t
+index b7632fc..fc15d89 100644
+--- a/t/39_foreign_keys.t
++++ b/t/39_foreign_keys.t
+@@ -49,7 +49,7 @@ ok insert_track(13, "My Way", 2);
+ # column (3) does not correspond to row in the artist table.
+ 
+ ok !insert_track(14, "Mr. Bojangles", 3);
+-ok $@ =~ qr/foreign key constraint failed/;
++ok $@ =~ qr/foreign key constraint failed/i;
+ 
+ # This succeeds because a NULL is inserted into trackartist. A
+ # corresponding row in the artist table is not required in this case.
+@@ -62,7 +62,7 @@ ok insert_track(14, "Mr. Bojangles", undef);
+ # artist table.
+ 
+ ok !update_track(3, "Mr. Bojangles");
+-ok $@ =~ /foreign key constraint failed/;
++ok $@ =~ /foreign key constraint failed/i;
+ 
+ # Insert the required row into the artist table. It is then possible
+ # to update the inserted row to set trackartist to 3 (since a
+diff --git a/t/rt_36838_unique_and_bus_error.t b/t/rt_36838_unique_and_bus_error.t
+index 2c3a819..5a8aafe 100644
+--- a/t/rt_36838_unique_and_bus_error.t
++++ b/t/rt_36838_unique_and_bus_error.t
+@@ -17,4 +17,4 @@ $dbh->do("CREATE TABLE nums (num INTEGER UNIQUE)");
+ ok $dbh->do("INSERT INTO nums (num) VALUES (?)", undef, 1);
+ 
+ eval { $dbh->do("INSERT INTO nums (num) VALUES (?)", undef, 1); };
+-ok $@ =~ /column num is not unique/, $@;  # should not be a bus error
++ok $@ =~ /column num is not unique|UNIQUE constraint failed/, $@;  # should not be a bus error
+-- 
+1.8.5.1
+
diff --git a/perl-DBD-SQLite.spec b/perl-DBD-SQLite.spec
index d212072..96f4596 100644
--- a/perl-DBD-SQLite.spec
+++ b/perl-DBD-SQLite.spec
@@ -1,12 +1,14 @@
 Name:           perl-DBD-SQLite
 Version:        1.37
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        SQLite DBI Driver
 Group:          Development/Libraries
 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
+# Fix tests with sqlite >= 3.8.2, in upstream after 1.41_03, bug #1058709
+Patch1:         DBD-SQLite-1.41_03-adapt_sqlite_3_8_2.patch
 # if sqlite >= 3.1.3 then
 #   perl-DBD-SQLite uses the external library
 # else
@@ -38,6 +40,7 @@ libraries.
 %prep
 %setup -q -n DBD-SQLite-%{version}
 %patch0 -p1 -b .bz543982
+%patch1 -p1
 
 %build
 CFLAGS="%{optflags}" perl Makefile.PL INSTALLDIRS=vendor
@@ -60,6 +63,9 @@ make test
 %{_mandir}/man3/*.3pm*
 
 %changelog
+* Wed Jan 29 2014 Petr Pisar <ppisar@xxxxxxxxxx> - 1.37-5
+- Fix tests with sqlite >= 3.8.2 (bug #1058709)
+
 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng@xxxxxxxxxxxxxxxxxxxxxxx> - 1.37-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_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