iwasakims commented on code in PR #1263:
URL: https://github.com/apache/bigtop/pull/1263#discussion_r1609257828
##########
bigtop-deploy/puppet/manifests/python.pp:
##########
@@ -14,16 +14,50 @@
# limitations under the License.
class python {
- if (($operatingsystem == 'Ubuntu' and 0 <=
versioncmp($operatingsystemmajrelease, '22.04'))) {
- file { '/usr/bin/python':
- ensure => 'link',
- target => '/usr/bin/python2',
+ case $operatingsystem {
+ /(?i:(centos|fedora|redhat|rocky))/: {
+ package { 'python3-devel':
+ ensure => 'present',
+ }
+ if ($operatingsystem != 'Fedora') {
+ case $operatingsystemmajrelease {
+ '9': {
+ package { 'python-unversioned-command':
+ ensure => 'present',
+ }
+ }
+ '8': {
+ exec { 'set-python3':
+ command => '/usr/sbin/update-alternatives --set
python /usr/bin/python3',
+ unless => "/usr/sbin/update-alternatives --query
python | grep -q 'Value: /usr/bin/python3'",
Review Comment:
Hmm. `--query` seems not to be valid option of `update-alternatives` of
rockylinux-8. @JiaLiangC
```
[root@4ff53a675cd3 /]# /usr/sbin/update-alternatives --query python
alternatives version 1.19.1 - Copyright (C) 2001 Red Hat, Inc.
This may be freely redistributed under the terms of the GNU Public License.
usage: alternatives --install <link> <name> <path> <priority>
[--initscript <service>]
[--family <family>]
[--slave <slave_link> <slave_name> <slave_path>]*
alternatives --remove <name> <path>
alternatives --auto <name>
alternatives --config <name>
alternatives --display <name>
alternatives --set <name> <path>
alternatives --list
alternatives --remove-all <name>
alternatives --add-slave <name> <path> <slave_link> <slave_name>
<slave_path>
alternatives --remove-slave <name> <path> <slave_name>
common options: --verbose --test --help --usage --version --keep-missing
--keep-foreign
--altdir <directory> --admindir <directory>
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]