[packages/perl-DBD-Pg] Up to 3.21.1
arekm
arekm at pld-linux.org
Wed Aug 26 08:49:42 CEST 2026
commit da8d963dce12d5192485338f9221ec1dbb89e0cf
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Wed Aug 26 08:49:11 2026 +0200
Up to 3.21.1
perl-DBD-Pg.spec | 9 +++++----
test-plan.patch | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 66 insertions(+), 4 deletions(-)
---
diff --git a/perl-DBD-Pg.spec b/perl-DBD-Pg.spec
index 0258767..5afeeed 100644
--- a/perl-DBD-Pg.spec
+++ b/perl-DBD-Pg.spec
@@ -23,13 +23,14 @@ Summary(sv.UTF-8): Ett gränssnitt till PostgresSQL för Perl
Summary(uk.UTF-8): Perl-інтерфейс до PostgresSQL
Summary(zh_CN.UTF-8): Perl 的 PostgresSQL 界面。
Name: perl-DBD-Pg
-Version: 3.20.2
-Release: 2
+Version: 3.21.1
+Release: 1
# same as perl
License: GPL v1+ or Artistic
Group: Development/Languages/Perl
Source0: https://www.cpan.org/modules/by-module/DBD/TURNSTEP/%{pdir}-%{pnam}-%{version}.tar.gz
-# Source0-md5: 47df9e208d26be363332bcdde538a859
+# Source0-md5: ba410eaa5b717638027bcef46e62eb8d
+Patch0: test-plan.patch
URL: https://metacpan.org/dist/DBD-Pg
BuildRequires: perl-ExtUtils-MakeMaker >= 6.58
BuildRequires: perl-DBI >= 1.614
@@ -42,7 +43,6 @@ BuildRequires: perl-version
BuildRequires: postgresql-devel >= 8
BuildRequires: rpm-perlprov >= 4.1-13
BuildRequires: rpmbuild(macros) >= 1.749
-Requires: perl-DBI >= 1.614
# version not detected
Provides: perl(DBD::Pg) = %{version}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -105,6 +105,7 @@ Perl.
%prep
%setup -q -n %{pdir}-%{pnam}-%{version}
+%patch -P0 -p1
%build
export POSTGRES_LIB="%{_libdir}"
diff --git a/test-plan.patch b/test-plan.patch
new file mode 100644
index 0000000..50c7178
--- /dev/null
+++ b/test-plan.patch
@@ -0,0 +1,61 @@
+Upstream 3.21.1 moved "plan tests" above the connect check in these three files,
+so the "plan skip_all" taken when no test database exists dies with
+"You tried to plan twice". Order them the way 01connect.t/02attribs.t already do.
+
+--- DBD-Pg-3.21.1/t/03dbmethod.t.orig
++++ DBD-Pg-3.21.1/t/03dbmethod.t
+@@ -17,7 +17,6 @@
+ use warnings;
+ use lib 'blib/lib', 'blib/arch', 't';
+ use Test::More;
+-plan tests => 702;
+ use Config;
+ use DBI ':sql_types';
+ use DBD::Pg ':pg_types';
+@@ -32,6 +31,8 @@
+ plan skip_all => 'Connection to database failed, cannot continue testing';
+ }
+
++plan tests => 702;
++
+ my $superuser = is_super();
+
+ isnt ($dbh, undef, 'Connect to database for database handle method testing');
+--- DBD-Pg-3.21.1/t/10_pg_error_field.t.orig
++++ DBD-Pg-3.21.1/t/10_pg_error_field.t
+@@ -7,7 +7,6 @@
+ use warnings;
+ use lib 'blib/lib', 'blib/arch', 't';
+ use Test::More;
+-plan tests => 5;
+ require 'dbdpg_test_setup.pl';
+ select(($|=1,select(STDERR),$|=1)[1]);
+
+@@ -17,6 +16,8 @@
+ plan skip_all => 'Connection to database failed, cannot continue testing';
+ }
+
++plan tests => 5;
++
+ my $t='Connect to database for pg_error_field testing';
+ isnt ($dbh, undef, $t);
+
+--- DBD-Pg-3.21.1/t/30unicode.t.orig
++++ DBD-Pg-3.21.1/t/30unicode.t
+@@ -13,7 +13,6 @@
+ use Encode qw(encode_utf8);
+ use Data::Dumper;
+ use Test::More;
+-plan tests => 2;
+ use open qw/ :std :encoding(utf8) /;
+ require 'dbdpg_test_setup.pl';
+ select(($|=1,select(STDERR),$|=1)[1]);
+@@ -24,6 +23,8 @@
+ plan skip_all => 'Connection to database failed, cannot continue testing';
+ }
+
++plan tests => 2;
++
+ isnt ($dbh, undef, 'Connect to database for unicode testing');
+
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/perl-DBD-Pg.git/commitdiff/da8d963dce12d5192485338f9221ec1dbb89e0cf
More information about the pld-cvs-commit
mailing list