Skip to content

Commit 382909b

Browse files
committed
Teach RPM the package name provided in Perl alias packages.
When commit 1185be3 introduced installation of a file containing "use PostgreSQL::Test::Utils", the RPM Package Manager said "nothing provides perl(PostgreSQL::Test::Utils)". Discussed on pgsql-packagers. Back-patch to v12, v13, and v14 only; newer versions don't have the alias packages. Reviewed by Andrew Dunstan, Tom Lane, and John Harvey. Reported by John Harvey.
1 parent 0dc08bb commit 382909b

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/test/perl/PostgreSQL/Test/Cluster.pm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,10 @@ use warnings;
1010
BEGIN { *PostgreSQL::Test::Cluster:: = \*PostgresNode::; }
1111
use PostgresNode ();
1212

13+
# There's no runtime requirement for the following package declaration, but it
14+
# convinces the RPM Package Manager that this file provides the Perl package
15+
# in question. Perl v5.10.1 segfaults if a declaration of the to-be-aliased
16+
# package precedes the aliasing itself, hence the abnormal placement.
17+
package PostgreSQL::Test::Cluster;
18+
1319
1;

src/test/perl/PostgreSQL/Test/Utils.pm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,10 @@ use warnings;
88
BEGIN { *PostgreSQL::Test::Utils:: = \*TestLib::; }
99
use TestLib ();
1010

11+
# There's no runtime requirement for the following package declaration, but it
12+
# convinces the RPM Package Manager that this file provides the Perl package
13+
# in question. Perl v5.10.1 segfaults if a declaration of the to-be-aliased
14+
# package precedes the aliasing itself, hence the abnormal placement.
15+
package PostgreSQL::Test::Utils;
16+
1117
1;

0 commit comments

Comments
 (0)