summaryrefslogtreecommitdiff
path: root/src/test/perl/PostgreSQL/Test/Cluster.pm
diff options
context:
space:
mode:
authorNoah Misch <noah@leadboat.com>2024-08-07 11:43:34 -0700
committerNoah Misch <noah@leadboat.com>2024-08-07 11:43:45 -0700
commit646b16bcafeaa98d7a085ccf4bef11dfc0999fb8 (patch)
tree58cf6ec2c49408b91dab97f2d4d634c6d43fe59a /src/test/perl/PostgreSQL/Test/Cluster.pm
parent76265a851b13bbb001a218481c0cb6315c0fdfe6 (diff)
Teach RPM the package name provided in Perl alias packages.
When commit 1185be355462d1dc7e2950a7e52eb7ca0cb6f3c8 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.
Diffstat (limited to 'src/test/perl/PostgreSQL/Test/Cluster.pm')
-rw-r--r--src/test/perl/PostgreSQL/Test/Cluster.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm
index 14e9138a394..c0c275a291b 100644
--- a/src/test/perl/PostgreSQL/Test/Cluster.pm
+++ b/src/test/perl/PostgreSQL/Test/Cluster.pm
@@ -10,4 +10,10 @@ use warnings;
BEGIN { *PostgreSQL::Test::Cluster:: = \*PostgresNode::; }
use PostgresNode ();
+# There's no runtime requirement for the following package declaration, but it
+# convinces the RPM Package Manager that this file provides the Perl package
+# in question. Perl v5.10.1 segfaults if a declaration of the to-be-aliased
+# package precedes the aliasing itself, hence the abnormal placement.
+package PostgreSQL::Test::Cluster;
+
1;