ppisar pushed to perl-DBIx-Class (f21). "Restore compatability with SQLite-3.9.0"

notifications at fedoraproject.org notifications at fedoraproject.org
Tue Nov 3 15:02:16 UTC 2015


From 8d77da69cb9bb77f733344303df98ba2dc4f2b8e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
Date: Tue, 3 Nov 2015 15:33:14 +0100
Subject: Restore compatability with SQLite-3.9.0

---
 ...-dependency-tests-to-work-on-newer-libsql.patch | 96 ++++++++++++++++++++++
 perl-DBIx-Class.spec                               |  8 +-
 2 files changed, 103 insertions(+), 1 deletion(-)
 create mode 100644 DBIx-Class-0.082820-Adjust-view-dependency-tests-to-work-on-newer-libsql.patch

diff --git a/DBIx-Class-0.082820-Adjust-view-dependency-tests-to-work-on-newer-libsql.patch b/DBIx-Class-0.082820-Adjust-view-dependency-tests-to-work-on-newer-libsql.patch
new file mode 100644
index 0000000..9f3da30
--- /dev/null
+++ b/DBIx-Class-0.082820-Adjust-view-dependency-tests-to-work-on-newer-libsql.patch
@@ -0,0 +1,96 @@
+From 5de3b12e4eecd4efb47e1896dc1d5432bc532568 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Tue, 3 Nov 2015 15:22:54 +0100
+Subject: [PATCH] Adjust view-dependency tests to work on newer libsqlite
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Port upstream fix for SQLite-3.9.0 to 0.082820:
+
+commit 26c663f123032941cb3f61d6cd11869b86716d6d
+Author: Peter Rabbitson <ribasushi at cpan.org>
+Date:   Tue Nov 3 14:35:35 2015 +0100
+
+    Adjust view-dependency tests to work on newer libsqlite
+
+    The test and mechanism behind it is largely useless in these cases, but old
+    sqlite installations will lurk around for ever, so keep the check while moving
+    it to xt/
+
+The original fix makes the tests author's tests, so they are not run
+at all. Let's keep the test running by default until upstream releases
+new version.
+
+CPAN RT#107852
+
+Signed-off-by: Petr Písař <ppisar at redhat.com>
+---
+ t/105view_deps.t | 29 ++++++++++++++++-------------
+ 1 file changed, 16 insertions(+), 13 deletions(-)
+
+diff --git a/t/105view_deps.t b/t/105view_deps.t
+index 21aa92b..39bb632 100644
+--- a/t/105view_deps.t
++++ b/t/105view_deps.t
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl
++use DBIx::Class::Optional::Dependencies -skip_all_without => 'deploy';
+ 
+ use strict;
+ use warnings;
+@@ -11,15 +11,6 @@ use DBICTest;
+ use ViewDeps;
+ use ViewDepsBad;
+ 
+-BEGIN {
+-    require DBIx::Class;
+-    plan skip_all => 'Test needs ' .
+-        DBIx::Class::Optional::Dependencies->req_missing_for('deploy')
+-      unless DBIx::Class::Optional::Dependencies->req_ok_for('deploy');
+-}
+-
+-use_ok('DBIx::Class::ResultSource::View');
+-
+ #################### SANITY
+ 
+ my $view = DBIx::Class::ResultSource::View->new;
+@@ -73,10 +64,16 @@ can_ok( $view, $_ ) for qw/new from deploy_depends_on/;
+     = ViewDepsBad->connect( DBICTest->_database ( quote_char => '"') );
+   ok( $schema2, 'Connected to ViewDepsBad schema OK' );
+ 
++  my $lazy_view_validity = !(
++    $schema2->storage->_server_info->{normalized_dbms_version}
++      <
++    3.009
++  );
++
+ #################### DEPLOY2
+ 
+   warnings_exist { $schema2->deploy }
+-    [qr/no such table: main.aba_name_artists/],
++    [ $lazy_view_validity ? () : qr/no such table: main.aba_name_artists/ ],
+     "Deploying the bad schema produces a warning: aba_name_artists was not created.";
+ 
+ #################### DOES ORDERING WORK 2?
+@@ -106,9 +103,15 @@ can_ok( $view, $_ ) for qw/new from deploy_depends_on/;
+     } grep { !/AbaNameArtistsAnd2010CDsWithManyTracks/ }
+     @{ [ $schema2->sources ] };
+ 
++  $schema2->storage->dbh->do(q( DROP VIEW "aba_name_artists" ))
++    if $lazy_view_validity;
++
+   throws_ok { $schema2->resultset('AbaNameArtistsAnd2010CDsWithManyTracks')->next }
+-    qr/no such table: aba_name_artists_and_2010_cds_with_many_tracks/,
+-    "Query on AbaNameArtistsAnd2010CDsWithManyTracks throws, because the table does not exist"
++    qr/no such table: (?:main\.)?aba_name_artists/,
++    sprintf(
++      "Query on AbaNameArtistsAnd2010CDsWithManyTracks throws, because the%s view does not exist",
++      $lazy_view_validity ? ' underlying' : ''
++    )
+   ;
+ }
+ 
+-- 
+2.4.3
+
diff --git a/perl-DBIx-Class.spec b/perl-DBIx-Class.spec
index 4b11927..7bcc6eb 100644
--- a/perl-DBIx-Class.spec
+++ b/perl-DBIx-Class.spec
@@ -1,7 +1,7 @@
 Name:           perl-DBIx-Class
 Summary:        Extensible and flexible object <-> relational mapper
 Version:        0.08250
-Release:        6%{?dist}
+Release:        7%{?dist}
 License:        GPL+ or Artistic
 Group:          Development/Libraries
 Source0:        http://search.cpan.org/CPAN/authors/id/R/RI/RIBASUSHI/DBIx-Class-%{version}.tar.gz
@@ -14,6 +14,8 @@ Patch1:         DBIx-Class-0.08250-Fix-ridiculous-regex-anchor-mistake-from-6613
 # Fix ::Ordered in combination with delete_all visible with sqlite 3.8.5,
 # bug #1110272, CPAN RT#96499
 Patch2:         DBIx-Class-0.08270-Fix-Ordered-in-combination-with-delete_all.patch
+# Restore compatability with SQLite-3.9.0, bug #1272905, CPAN RT#107852
+Patch3:         DBIx-Class-0.082820-Adjust-view-dependency-tests-to-work-on-newer-libsql.patch
 URL:            http://search.cpan.org/dist/DBIx-Class/
 Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
 BuildArch:      noarch
@@ -146,6 +148,7 @@ DISTINCT, GROUP BY and HAVING support.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 find t/ -type f -exec perl -pi -e 's|\r||; s|^#!perl|#!%{__perl}|' {} +
 find .  -type f -exec chmod -c -x {} +
@@ -193,6 +196,9 @@ make test
 
 
 %changelog
+* Tue Nov 03 2015 Petr Pisar <ppisar at redhat.com> - 0.08250-7
+- Restore compatability with SQLite-3.9.0 (bug #1272905)
+
 * Wed Jun 18 2014 Petr Pisar <ppisar at redhat.com> - 0.08250-6
 - Fix ::Ordered in combination with delete_all (bug #1110272)
 
-- 
cgit v0.11.2


	http://pkgs.fedoraproject.org/cgit/perl-DBIx-Class.git/commit/?h=f21&id=8d77da69cb9bb77f733344303df98ba2dc4f2b8e


More information about the perl-devel mailing list