Module: ForemanMaintain::Concerns::PrimaryChecks

Included in:
ForemanMaintain
Defined in:
lib/foreman_maintain/concerns/primary_checks.rb

Instance Method Summary collapse

Instance Method Details

#package_nameObject



14
15
16
17
18
19
20
21
22
# File 'lib/foreman_maintain/concerns/primary_checks.rb', line 14

def package_name
  installed_scenario = detector.feature(:installer).last_scenario
  case installed_scenario
  when 'satellite'
    'satellite'
  when 'capsule'
    'satellite-capsule'
  end
end

#validate_downstream_packagesObject



4
5
6
7
8
9
10
11
12
# File 'lib/foreman_maintain/concerns/primary_checks.rb', line 4

def validate_downstream_packages
  return unless detector.feature(:installer)

  if (package = package_name) && !package_manager.installed?(package)
    raise ForemanMaintain::Error::Fail,
      "Error: Important rpm package #{package} is not installed!"\
      "\nInstall #{package} rpm to ensure system consistency."
  end
end