[perl-DBIx-Class] Adapt to new sqlite-3.8.2 exception messages

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

 



commit 14999c3525ac7993a8db3615087d46445fb5bcc0
Author: Petr Písař <ppisar@xxxxxxxxxx>
Date:   Wed Apr 9 15:42:48 2014 +0200

    Adapt to new sqlite-3.8.2 exception messages

 ...SQLite-changed-their-exception-text-again.patch |   67 ++++++++++++++++++++
 perl-DBIx-Class.spec                               |    9 +++-
 2 files changed, 75 insertions(+), 1 deletions(-)
---
diff --git a/DBIx-Class-0.08250-SQLite-changed-their-exception-text-again.patch b/DBIx-Class-0.08250-SQLite-changed-their-exception-text-again.patch
new file mode 100644
index 0000000..61811ba
--- /dev/null
+++ b/DBIx-Class-0.08250-SQLite-changed-their-exception-text-again.patch
@@ -0,0 +1,67 @@
+From ed5550d36c5771dfb5492b23127f8af9e38254d4 Mon Sep 17 00:00:00 2001
+From: Peter Rabbitson <ribasushi@xxxxxxxx>
+Date: Mon, 13 Jan 2014 12:49:53 +0100
+Subject: [PATCH] SQLite changed their exception text again
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Petr Písař <ppisar@xxxxxxxxxx>
+
+Ported to 0.08250.
+
+diff --git a/t/multi_create/standard.t b/t/multi_create/standard.t
+index 5a02947..6c1efd8 100644
+--- a/t/multi_create/standard.t
++++ b/t/multi_create/standard.t
+@@ -444,7 +444,11 @@ throws_ok ( sub {
+     #$t->cd($t->new_related('cd', { artist => undef } ) );
+     #$t->{_rel_in_storage} = 0;
+     $t->insert;
+-}, qr/cd.artist may not be NULL/, "Exception propogated properly");
++}, qr/DBI Exception.+(?x:
++    \QNOT NULL constraint failed: cd.artist\E
++      |
++    \Qcd.artist may not be NULL\E
++)/s, "Exception propogated properly");
+ 
+ lives_ok ( sub {
+   $schema->resultset('CD')->create ({
+diff --git a/t/relationship/update_or_create_multi.t b/t/relationship/update_or_create_multi.t
+index 8710048..c7cce7a 100644
+--- a/t/relationship/update_or_create_multi.t
++++ b/t/relationship/update_or_create_multi.t
+@@ -69,7 +69,12 @@ throws_ok {
+     year => 2020,
+     title => 'the best thing since sliced bread',
+   })
+-} qr/\Qcd.artist may not be NULL/, 'ambiguous find + create failed';
++} qr/DBI Exception.+(?x:
++    \QNOT NULL constraint failed: cd.artist\E
++      |
++    \Qcd.artist may not be NULL\E
++)/s, 'ambiguous find + create failed'
++;
+ 
+ # expect a create, after a failed search using *only* the
+ # *current* relationship and the unique column constraints
+diff --git a/t/storage/error.t b/t/storage/error.t
+index d5980eb..61d6782 100644
+--- a/t/storage/error.t
++++ b/t/storage/error.t
+@@ -15,7 +15,11 @@ warnings_are ( sub {
+     sub {
+       $schema->resultset('CD')->create({ title => 'vacation in antarctica' })
+     },
+-    qr/DBI Exception.+cd\.artist.+NULL/s
++    qr/DBI Exception.+(?x:
++      \QNOT NULL constraint failed: cd.artist\E
++        |
++      \Qcd.artist may not be NULL\E
++    )/s
+   );  # as opposed to some other error
+ }, [], 'No warnings besides exception' );
+ 
+-- 
+1.9.0
+
diff --git a/perl-DBIx-Class.spec b/perl-DBIx-Class.spec
index 8238789..a654ffb 100644
--- a/perl-DBIx-Class.spec
+++ b/perl-DBIx-Class.spec
@@ -1,10 +1,13 @@
 Name:           perl-DBIx-Class
 Summary:        Extensible and flexible object <-> relational mapper
 Version:        0.08250
-Release:        2%{?dist}
+Release:        3%{?dist}
 License:        GPL+ or Artistic
 Group:          Development/Libraries
 Source0:        http://search.cpan.org/CPAN/authors/id/R/RI/RIBASUSHI/DBIx-Class-%{version}.tar.gz
+# Adapt to new sqlite-3.8.2 exception messages, bug #1085336, CPAN RT#91947,
+# in upstream version 0.08260
+Patch0:         DBIx-Class-0.08250-SQLite-changed-their-exception-text-again.patch
 URL:            http://search.cpan.org/dist/DBIx-Class/
 Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
 BuildArch:      noarch
@@ -134,6 +137,7 @@ DISTINCT, GROUP BY and HAVING support.
 
 %prep
 %setup -q -n DBIx-Class-%{version}
+%patch0 -p1
 
 find t/ -type f -exec perl -pi -e 's|\r||; s|^#!perl|#!%{__perl}|' {} +
 find .  -type f -exec chmod -c -x {} +
@@ -181,6 +185,9 @@ make test
 
 
 %changelog
+* Wed Apr 09 2014 Petr Pisar <ppisar@xxxxxxxxxx> - 0.08250-3
+- Adapt to new sqlite-3.8.2 exception messages (bug #1085336)
+
 * Wed Aug 14 2013 Jitka Plesnikova <jplesnik@xxxxxxxxxx> - 0.08250-2
 - Perl 5.18 re-rebuild of bootstrapped packages
 
--
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