Project

General

Profile

Actions

Bug #18537

closed

Clarify Java version check

Added by Stephen Benjamin about 7 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Installer
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1422324

Description of problem:

/usr/share/katello-installer-base/hooks/pre/15-check_java.rb checks for OpenJDK version >= 1.7 but error message says OpenJDK version should be > 1.7

Version-Release number of selected component (if applicable):

6.2.7

How reproducible:

100%

Steps to Reproduce:
1. Examine /usr/share/katello-installer-base/hooks/pre/15-check_java.rb

Actual results:

JAVA_VERSION = %q(An OpenJDK version of Java greater than 1.7 should be installed. For more
details on the version currently installed, run 'java -version')

OPENJDK = %q(A version of java which is not OpenJDK is installed.

Please install an OpenJDK version greater than 1.7 and make sure it
was set as the default java using

alternatives --config java

For more details on the version currently installed, run 'java -version'.)

Expected results:

JAVA_VERSION = %q(An OpenJDK version of Java greater than or equal to 1.7 should be installed. For more
details on the version currently installed, run 'java -version')

OPENJDK = %q(A version of java which is not OpenJDK is installed.

Please install an OpenJDK version greater than or equal to 1.7 and make sure it
was set as the default java using

alternatives --config java

For more details on the version currently installed, run 'java -version'.)

Additional info:

Actual check is:
if Kafo::Helpers.module_enabled?(@kafo, 'katello')
java_version_string = `/usr/bin/java -version 2>&1`
java_version = java_version_string.split("\n")[0].split('"')[1]

  1. Check that OpenJDK 1.7 or higher is installed if any java is installed
    if java_version
    error_exit(JAVA_VERSION, 1) if java_version < "1.7"
    error_exit(OPENJDK, 2) unless java_version_string.include? "OpenJDK"
    end
    end
Actions #1

Updated by The Foreman Bot about 7 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Stephen Benjamin
  • Pull request https://github.com/Katello/katello-installer/pull/482 added
Actions #2

Updated by Anonymous about 7 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #3

Updated by Justin Sherrill about 7 years ago

  • Subject changed from Clarify Java version check to Clarify Java version check
  • translation missing: en.field_release set to 219
Actions

Also available in: Atom PDF