Skip to content

Commit 713e9df

Browse files
committed
[MODULES-8779] Set proper python_package_name for RHEL/CentOS 8
mysql::bindings::python installs the package set by the python_package_name variable, which is 'MySQL-python' by default on all RHEL and Fedora-based systems. This is no longer valid for RHEL 8, since there is no Python3 support for the package. In RHEL 8, we should use python-PyMySQL instead.
1 parent 3a61aa8 commit 713e9df

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

manifests/params.pp

+6-1
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,19 @@
4949
} else {
5050
$provider = 'mysql'
5151
}
52+
$python_package_name = 'MySQL-python'
5253
}
5354
/^(RedHat|CentOS|Scientific|OracleLinux)$/: {
5455
if versioncmp($::operatingsystemmajrelease, '7') >= 0 {
5556
$provider = 'mariadb'
5657
} else {
5758
$provider = 'mysql'
5859
}
60+
if versioncmp($::operatingsystemmajrelease, '8') >= 0 {
61+
$python_package_name = 'python3-PyMySQL'
62+
} else {
63+
$python_package_name = 'MySQL-python'
64+
}
5965
}
6066
default: {
6167
$provider = 'mysql'
@@ -96,7 +102,6 @@
96102
$java_package_name = 'mysql-connector-java'
97103
$perl_package_name = 'perl-DBD-MySQL'
98104
$php_package_name = 'php-mysql'
99-
$python_package_name = 'MySQL-python'
100105
$ruby_package_name = 'ruby-mysql'
101106
$client_dev_package_name = undef
102107
}

0 commit comments

Comments
 (0)