[perl-Data-ObjectDriver/f20] Patch Data-ObjectDriver to handle the new sqlite error return format

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

 



commit 7225758934c2b0c418bd9d206f6fb310b655e9cb
Author: Emmanuel Seyman <emmanuel@xxxxxxxxx>
Date:   Sun Mar 23 00:48:36 2014 +0100

    Patch Data-ObjectDriver to handle the new sqlite error return format

 perl-Data-ObjectDriver-sqlite-return.patch |   12 ++++++++++++
 perl-Data-ObjectDriver.spec                |   11 +++++++++--
 2 files changed, 21 insertions(+), 2 deletions(-)
---
diff --git a/perl-Data-ObjectDriver-sqlite-return.patch b/perl-Data-ObjectDriver-sqlite-return.patch
new file mode 100644
index 0000000..4a32f7b
--- /dev/null
+++ b/perl-Data-ObjectDriver-sqlite-return.patch
@@ -0,0 +1,12 @@
+diff -up ./lib/Data/ObjectDriver/Driver/DBD/SQLite.pm.orig ./lib/Data/ObjectDriver/Driver/DBD/SQLite.pm
+--- ./lib/Data/ObjectDriver/Driver/DBD/SQLite.pm.orig	2014-03-22 23:51:49.381272935 +0100
++++ ./lib/Data/ObjectDriver/Driver/DBD/SQLite.pm	2014-03-22 23:52:18.068098530 +0100
+@@ -30,7 +30,7 @@ sub bind_param_attributes {
+ sub map_error_code {
+     my $dbd = shift;
+     my($code, $msg) = @_;
+-    if ($msg && $msg =~ /not unique/) {
++    if ($msg && $msg =~ /not unique|UNIQUE constraint failed/) {
+         return Data::ObjectDriver::Errors->UNIQUE_CONSTRAINT;
+     } else {
+         return;
diff --git a/perl-Data-ObjectDriver.spec b/perl-Data-ObjectDriver.spec
index 6a82233..9490c78 100644
--- a/perl-Data-ObjectDriver.spec
+++ b/perl-Data-ObjectDriver.spec
@@ -1,11 +1,14 @@
 Name:           perl-Data-ObjectDriver
 Version:        0.09
-Release:        9%{?dist}
+Release:        10%{?dist}
 Summary:        Simple, transparent data interface, with caching
 License:        GPL+ or Artistic
 Group:          Development/Libraries
 URL:            http://search.cpan.org/dist/Data-ObjectDriver/
 Source0:        http://search.cpan.org/CPAN/authors/id/S/SI/SIXAPART/Data-ObjectDriver-%{version}.tar.gz
+# Patch to handle new sqlite error return format (rt.cpan.org #92870)
+Patch0:         perl-Data-ObjectDriver-sqlite-return.patch
+
 BuildArch:      noarch
 BuildRequires:  perl(ExtUtils::MakeMaker)
 BuildRequires:  perl(DBI)
@@ -28,7 +31,8 @@ oriented design concepts onto a relational database.
 %setup -q -n Data-ObjectDriver-%{version}
 # Bundled Test::Builder has to match system Test-Simple, CPAN RT#87294
 rm -rf inc/Test/Builder*
-sed -i -e '/^inc\/Test\/Builder[\.\/]/d' MANIFEST
+sed -i -e '/^inc\/Test\/Builder[\.\/]/d' MANIFEST 
+%patch0
 
 %build
 %{__perl} Makefile.PL INSTALLDIRS=vendor
@@ -50,6 +54,9 @@ make test
 %{_mandir}/man3/*
 
 %changelog
+* Sun Mar 23 2014 Emmanuel Seyman <emmanuel@xxxxxxxxx> - 0.09-10
+- Patch Data-ObjectDriver to handle the new sqlite error return format
+
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng@xxxxxxxxxxxxxxxxxxxxxxx> - 0.09-9
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_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