Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

Commit 0944cc5

Browse files
committed
minor code fixes
1 parent 22dbd0b commit 0944cc5

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

manifests/download.pp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
fail('You must include the oracle_java base class before using any oracle_java sub class')
66
}
77

8-
include ::archive
8+
if !defined(Class['archive']) {
9+
include archive
10+
}
911

10-
$require_extraction = $oracle_java::type ? {
12+
$require_extraction = $oracle_java::format ? {
1113
'tar.gz' => true,
1214
default => false
1315
}
@@ -28,6 +30,6 @@
2830
extract => $require_extraction,
2931
extract_path => '/usr/java',
3032
creates => "/usr/java/${oracle_java::longversion}",
31-
cleanup => true,
33+
cleanup => true
3234
}
3335
}

manifests/init.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,4 +190,5 @@
190190

191191
include oracle_java::download
192192
include oracle_java::install
193+
Class['oracle_java::download'] -> Class['oracle_java::install']
193194
}

manifests/install.pp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
package { $oracle_java::packagename:
1818
ensure => latest,
1919
source => "/usr/java/${oracle_java::filename}",
20-
provider => rpm,
21-
require => Exec['download java RPM']
20+
provider => rpm
2221
}
2322
}
2423
# the procedure is a bit more complicated for Java 6...
@@ -29,7 +28,7 @@
2928
cwd => '/usr/java',
3029
creates => "/usr/java/${oracle_java::filename_extracted}",
3130
command => "sed -ni '/exit 0/,\${//!p}' ${oracle_java::filename}; chmod +x ${oracle_java::filename}; ./${oracle_java::filename}",
32-
require => [Package['sed'], Exec['download java RPM']]
31+
require => Package['sed']
3332
} ~>
3433
# remove undesired extra RPMs
3534
exec { 'cleanup java RPM':

0 commit comments

Comments
 (0)