mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-19 03:14:03 +00:00
perl-DBIx-Class: 0.082820 -> 0.082821
Also remove patches for issues that have been resolved upstream.
This commit is contained in:
parent
8b2be11b13
commit
cf463bbd1a
@ -1,95 +0,0 @@
|
|||||||
From 5de3b12e4eecd4efb47e1896dc1d5432bc532568 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@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@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@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
|
|
@ -1,23 +0,0 @@
|
|||||||
From e9d552de92cde6552f35cd45a3572df1e25609cc Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Rabbitson <ribasushi@cpan.org>
|
|
||||||
Date: Tue, 19 May 2015 05:49:48 +0200
|
|
||||||
Subject: [PATCH] Make sure tests pass without a compiler present (another step
|
|
||||||
to RT#74706)
|
|
||||||
|
|
||||||
--- a/t/52leaks.t
|
|
||||||
+++ b/t/52leaks.t
|
|
||||||
@@ -446,6 +446,14 @@ for my $addr (keys %$weak_registry) {
|
|
||||||
delete $weak_registry->{$addr}
|
|
||||||
unless $cleared->{hash_merge_singleton}{$weak_registry->{$addr}{weakref}{behavior}}++;
|
|
||||||
}
|
|
||||||
+ elsif ($names =~ /^B::Hooks::EndOfScope::PP::_TieHintHashFieldHash/m) {
|
|
||||||
+ # there is one tied lexical which stays alive until GC time
|
|
||||||
+ # https://metacpan.org/source/ETHER/B-Hooks-EndOfScope-0.15/lib/B/Hooks/EndOfScope/PP/FieldHash.pm#L24
|
|
||||||
+ # simply ignore it here, instead of teaching the leaktracer to examine ties
|
|
||||||
+ # the latter is possible yet terrible: https://github.com/dbsrgits/dbix-class/blob/v0.082820/t/lib/DBICTest/Util/LeakTracer.pm#L113-L117
|
|
||||||
+ delete $weak_registry->{$addr}
|
|
||||||
+ unless $cleared->{bheos_pptiehinthashfieldhash}++;
|
|
||||||
+ }
|
|
||||||
elsif ($names =~ /^DateTime::TimeZone::UTC/m) {
|
|
||||||
# DT is going through a refactor it seems - let it leak zones for now
|
|
||||||
delete $weak_registry->{$addr};
|
|
@ -3339,18 +3339,13 @@ let self = _self // overrides; _self = with self; {
|
|||||||
};
|
};
|
||||||
|
|
||||||
DBIxClass = buildPerlPackage rec {
|
DBIxClass = buildPerlPackage rec {
|
||||||
name = "DBIx-Class-0.082820";
|
name = "DBIx-Class-0.082821";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://cpan/authors/id/R/RI/RIBASUSHI/${name}.tar.gz";
|
url = "mirror://cpan/authors/id/R/RI/RIBASUSHI/${name}.tar.gz";
|
||||||
sha256 = "7b6083a1273d474d785aa93581dc1da334bbe5d83c741574ee2e3942559daeb9";
|
sha256 = "1picibywz5sdpaa1pmbv7xfw52nbz6fh32afb1p2qwsgzbkhqvnw";
|
||||||
};
|
};
|
||||||
buildInputs = [ DBDSQLite PackageStash SQLTranslator TestDeep TestException TestWarn ];
|
buildInputs = [ DBDSQLite PackageStash SQLTranslator TestDeep TestException TestWarn ];
|
||||||
propagatedBuildInputs = [ ClassAccessorGrouped ClassC3Componentised ClassInspector ConfigAny ContextPreserve DBI DataDumperConcise DataPage DevelGlobalDestruction HashMerge MROCompat ModuleFind Moo PathClass SQLAbstract ScopeGuard SubName namespaceclean ];
|
propagatedBuildInputs = [ ClassAccessorGrouped ClassC3Componentised ClassInspector ConfigAny ContextPreserve DBI DataDumperConcise DataPage DevelGlobalDestruction HashMerge MROCompat ModuleFind Moo PathClass SQLAbstract ScopeGuard SubName namespaceclean ];
|
||||||
patches = [
|
|
||||||
# Fix test error inside t/52leaks.t
|
|
||||||
../development/perl-modules/dbix-class-fix-52leaks.patch
|
|
||||||
../development/perl-modules/DBIx-Class-0.082820-Adjust-view-dependency-tests-to-work-on-newer-libsql.patch
|
|
||||||
];
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = http://www.dbix-class.org/;
|
homepage = http://www.dbix-class.org/;
|
||||||
description = "Extensible and flexible object <-> relational mapper";
|
description = "Extensible and flexible object <-> relational mapper";
|
||||||
|
Loading…
Reference in New Issue
Block a user