Skip to content

Commit 5a0261a

Browse files
Merge pull request #562 from puppetlabs/CONT-1179-fix-build-failure
(CONT-1179) - Fixing build failures
2 parents f143cac + f402091 commit 5a0261a

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

manifests/init.pp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,16 @@
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) {
116+
exec { 'Enable legacy repos':
117+
path => '/bin:/usr/bin/:/sbin:/usr/sbin',
118+
command => 'SUSEConnect --product sle-module-legacy/15.4/x86_64',
119+
unless => 'SUSEConnect --status-text | grep sle-module-legacy/15.4/x86_64',
120+
}
121+
}
122+
113123
if $facts['os']['family'] == 'Debian' {
114124
# Needed for update-java-alternatives
115125
package { 'java-common':

spec/classes/java_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,14 @@
144144
end
145145

146146
context 'when selecting default for SLES 11.3' do
147-
let(:facts) { { os: { family: 'Suse', name: 'SLES', release: { full: '11.3' }, architecture: 'x86_64' } } }
147+
let(:facts) { { os: { family: 'Suse', name: 'SLES', release: { full: '11.3', major: '11', minor: '3' }, architecture: 'x86_64' } } }
148148

149149
it { is_expected.to contain_package('java').with_name('java-1_6_0-ibm-devel') }
150150
it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib64/jvm/java-1.6.0-ibm-1.6.0/') }
151151
end
152152

153153
context 'when selecting default for SLES 11.4' do
154-
let(:facts) { { os: { family: 'Suse', name: 'SLES', release: { full: '11.4' }, architecture: 'x86_64' } } }
154+
let(:facts) { { os: { family: 'Suse', name: 'SLES', release: { full: '11.4', major: '11', minor: '4' }, architecture: 'x86_64' } } }
155155

156156
it { is_expected.to contain_package('java').with_name('java-1_7_1-ibm-devel') }
157157
it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib64/jvm/java-1.7.1-ibm-1.7.1/') }

0 commit comments

Comments
 (0)