Skip to content

Commit 0e0d128

Browse files
authored
Merge pull request #601 from span786/CAT-2051-fix-sles-15-failures
2 parents 6319799 + 2478e84 commit 0e0d128

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

manifests/init.pp

+4-5
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,12 @@
110110
default => '--jre'
111111
}
112112

113-
# Enable legacy repo to install net-tools-deprecated package
114-
# If SUSE OS major version is >= 15 and minor version is > 3
115-
if ($facts['os']['family'] in ['SLES', 'SUSE']) and (versioncmp($facts['os']['release']['major'], '15') >= 0 and versioncmp($facts['os']['release']['minor'], '3') == 1) {
113+
# If the OS is SLES >= 15.3, enable the legacy repo to install net-tools-deprecated package
114+
if ($facts['os']['family'] in ['SLES', 'SUSE']) and (versioncmp($facts['os']['release']['full'], '15.3') >= 0) {
116115
exec { 'Enable legacy repos':
117116
path => '/bin:/usr/bin/:/sbin:/usr/sbin',
118-
command => 'SUSEConnect --product sle-module-legacy/15.5/x86_64',
119-
unless => 'SUSEConnect --status-text | grep sle-module-legacy/15.5/x86_64',
117+
command => "SUSEConnect --product sle-module-legacy/${facts['os']['release']['full']}/x86_64",
118+
unless => "SUSEConnect --status-text | grep sle-module-legacy/${facts['os']['release']['full']}/x86_64",
120119
}
121120
}
122121

spec/classes/java_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
end
9696

9797
context 'when selecting default for OpenSUSE 12.3' do
98-
let(:facts) { { os: { family: 'Suse', name: 'OpenSUSE', release: { major: '12.3' }, architecture: 'x86_64' } } }
98+
let(:facts) { { os: { family: 'Suse', name: 'OpenSUSE', release: { full: '12.3', major: '12', minor: '3' }, architecture: 'x86_64' } } }
9999

100100
it { is_expected.to contain_package('java').with_name('java-1_7_0-openjdk-devel') }
101101
it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib64/jvm/java-1.7.0-openjdk-1.7.0/') }

0 commit comments

Comments
 (0)