BIGTOP-3482. Fix toolchain not to break cmake by creating unnecessary symlink. (#719)
diff --git a/bigtop_toolchain/manifests/packages.pp b/bigtop_toolchain/manifests/packages.pp
index c42c549..b0bbb59 100644
--- a/bigtop_toolchain/manifests/packages.pp
+++ b/bigtop_toolchain/manifests/packages.pp
@@ -260,16 +260,18 @@
command => "/usr/bin/pip3 freeze --all; /usr/bin/pip3 --version; /usr/bin/pip3 install -q flake8 wheel",
}
- if ($operatingsystem == 'Fedora' and versioncmp($operatingsystemmajrelease, '31') >= 0) or
- ($osfamily == 'RedHat' and $operatingsystem != 'Fedora' and versioncmp($operatingsystemmajrelease, '8') >= 0) {
- file { '/usr/bin/python':
- ensure => 'link',
- target => '/usr/bin/python2',
- }
- } else {
- file { '/usr/bin/cmake':
- ensure => 'link',
- target => '/usr/bin/cmake3',
+ if $osfamily == 'RedHat' {
+ if ($operatingsystem == 'Fedora' and versioncmp($operatingsystemmajrelease, '31') >= 0) or
+ ($operatingsystem != 'Fedora' and versioncmp($operatingsystemmajrelease, '8' ) >= 0) {
+ file { '/usr/bin/python':
+ ensure => 'link',
+ target => '/usr/bin/python2',
+ }
+ } else {
+ file { '/usr/bin/cmake':
+ ensure => 'link',
+ target => '/usr/bin/cmake3',
+ }
}
}
}