git.iko.soy/typeable/nixpkgs
on master help sign in
perl-DBIx-Class: 0.082801 -> 0.082820
commit5bc1ddd78ffe566dc3f36b6fecb14fd0b0a3ac8f authorRobert Helgesson <robert@rycee.net> dateTue 10 Nov 2015, 21:15 (11 years ago) parent9da2781
3 files changed+34−59
pkgs/development/perl-modules/dbix-class-fix-52leaks.patch+23 pkgs/development/perl-modules/dbix-class-fix-tests.patch−52 pkgs/top-level/perl-packages.nix+11−7
pkgs/development/perl-modules/dbix-class-fix-52leaks.patchnew file+23
@@ -0,0 +1,23 @@
1+From e9d552de92cde6552f35cd45a3572df1e25609cc Mon Sep 17 00:00:00 2001
2+From: Peter Rabbitson <ribasushi@cpan.org>
3+Date: Tue, 19 May 2015 05:49:48 +0200
4+Subject: [PATCH] Make sure tests pass without a compiler present (another step
5+ to RT#74706)
6+
7+--- a/t/52leaks.t
8++++ b/t/52leaks.t
9+@@ -446,6 +446,14 @@ for my $addr (keys %$weak_registry) {
10+ delete $weak_registry->{$addr}
11+ unless $cleared->{hash_merge_singleton}{$weak_registry->{$addr}{weakref}{behavior}}++;
12+ }
13++ elsif ($names =~ /^B::Hooks::EndOfScope::PP::_TieHintHashFieldHash/m) {
14++ # there is one tied lexical which stays alive until GC time
15++ # https://metacpan.org/source/ETHER/B-Hooks-EndOfScope-0.15/lib/B/Hooks/EndOfScope/PP/FieldHash.pm#L24
16++ # simply ignore it here, instead of teaching the leaktracer to examine ties
17++ # the latter is possible yet terrible: https://github.com/dbsrgits/dbix-class/blob/v0.082820/t/lib/DBICTest/Util/LeakTracer.pm#L113-L117
18++ delete $weak_registry->{$addr}
19++ unless $cleared->{bheos_pptiehinthashfieldhash}++;
20++ }
21+ elsif ($names =~ /^DateTime::TimeZone::UTC/m) {
22+ # DT is going through a refactor it seems - let it leak zones for now
23+ delete $weak_registry->{$addr};
pkgs/development/perl-modules/dbix-class-fix-tests.patchdeleted−52
@@ -1,52 +0,0 @@
1−diff --git a/t/multi_create/standard.t b/t/multi_create/standard.t
2−index 5a02947..6c1efd8 100644
3−--- a/t/multi_create/standard.t
4−+++ b/t/multi_create/standard.t
5−@@ -444,7 +444,11 @@ throws_ok ( sub {
6− #$t->cd($t->new_related('cd', { artist => undef } ) );
7− #$t->{_rel_in_storage} = 0;
8− $t->insert;
9−-}, qr/cd.artist may not be NULL/, "Exception propogated properly");
10−+}, qr/DBI Exception.+(?x:
11−+ \QNOT NULL constraint failed: cd.artist\E
12−+ |
13−+ \Qcd.artist may not be NULL\E
14−+)/s, "Exception propogated properly");
15−
16− lives_ok ( sub {
17− $schema->resultset('CD')->create ({
18−diff --git a/t/relationship/update_or_create_multi.t b/t/relationship/update_or_create_multi.t
19−index 8710048..c7cce7a 100644
20−--- a/t/relationship/update_or_create_multi.t
21−+++ b/t/relationship/update_or_create_multi.t
22−@@ -69,7 +69,12 @@ throws_ok {
23− year => 2020,
24− title => 'the best thing since sliced bread',
25− })
26−-} qr/\Qcd.artist may not be NULL/, 'ambiguous find + create failed';
27−+} qr/DBI Exception.+(?x:
28−+ \QNOT NULL constraint failed: cd.artist\E
29−+ |
30−+ \Qcd.artist may not be NULL\E
31−+)/s, 'ambiguous find + create failed'
32−+;
33−
34− # expect a create, after a failed search using *only* the
35− # *current* relationship and the unique column constraints
36−diff --git a/t/storage/error.t b/t/storage/error.t
37−index d5980eb..61d6782 100644
38−--- a/t/storage/error.t
39−+++ b/t/storage/error.t
40−@@ -15,7 +15,11 @@ warnings_are ( sub {
41− sub {
42− $schema->resultset('CD')->create({ title => 'vacation in antarctica' })
43− },
44−- qr/DBI Exception.+cd\.artist.+NULL/s
45−+ qr/DBI Exception.+(?x:
46−+ \QNOT NULL constraint failed: cd.artist\E
47−+ |
48−+ \Qcd.artist may not be NULL\E
49−+ )/s
50− ); # as opposed to some other error
51− }, [], 'No warnings besides exception' );
52−
pkgs/top-level/perl-packages.nix+11−7
@@ -3108,19 +3108,23 @@ let self = _self // overrides; _self = with self; {
31083108 };
31093109 };
31103110
3111− DBIxClass = buildPerlPackage {
3112− name = "DBIx-Class-0.082801";
3111+ DBIxClass = buildPerlPackage rec {
3112+ name = "DBIx-Class-0.082820";
31133113 src = fetchurl {
3114− url = mirror://cpan/authors/id/R/RI/RIBASUSHI/DBIx-Class-0.082801.tar.gz;
3115− sha256 = "889d6f9139d8e73f5524dfa211019126042e84cb7a0ec30cd2ed7d315d73484b";
3114+ url = "mirror://cpan/authors/id/R/RI/RIBASUSHI/${name}.tar.gz";
3115+ sha256 = "7b6083a1273d474d785aa93581dc1da334bbe5d83c741574ee2e3942559daeb9";
31163116 };
3117− buildInputs = [ DBDSQLite PackageStash TestDeep TestException TestWarn ];
3118− propagatedBuildInputs = [ ClassAccessorGrouped ClassC3Componentised ClassInspector ConfigAny ContextPreserve DBI DataDumperConcise DataPage DevelGlobalDestruction HashMerge MROCompat ModuleFind Moo PathClass SQLAbstract ScopeGuard SubName TryTiny namespaceclean ];
3119− doCheck = false;
3117+ buildInputs = [ DBDSQLite PackageStash SQLTranslator TestDeep TestException TestWarn ];
3118+ propagatedBuildInputs = [ ClassAccessorGrouped ClassC3Componentised ClassInspector ConfigAny ContextPreserve DBI DataDumperConcise DataPage DevelGlobalDestruction HashMerge MROCompat ModuleFind Moo PathClass SQLAbstract ScopeGuard SubName namespaceclean ];
3119+ patches = [
3120+ # Fix test error inside t/52leaks.t
3121+ ../development/perl-modules/dbix-class-fix-52leaks.patch
3122+ ];
31203123 meta = {
31213124 homepage = http://www.dbix-class.org/;
31223125 description = "Extensible and flexible object <-> relational mapper";
31233126 license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ];
3127+ maintainers = [ maintainers.rycee ];
31243128 };
31253129 };
31263130