Skip to content

Commit

Permalink
Fixes #36297 - Enable tracer on debian/ubuntu is always on (#10514)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbernhard authored Apr 17, 2023
1 parent a331781 commit ac0b74a
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions app/models/katello/host/content_facet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -298,19 +298,26 @@ def available_releases
end

def katello_agent_installed?
self.host.installed_packages.where("#{Katello::InstalledPackage.table_name}.name" => 'katello-agent').any?
self.host.installed_packages.where("#{Katello::InstalledPackage.table_name}.name" => 'katello-agent').any? ||
self.host.installed_debs.where("#{Katello::InstalledDeb.table_name}.name" => 'katello-agent').any?
end

def tracer_installed?
self.host.installed_packages.where("#{Katello::InstalledPackage.table_name}.name" => [ "python-#{HOST_TOOLS_TRACER_PACKAGE_NAME}",
"python3-#{HOST_TOOLS_TRACER_PACKAGE_NAME}",
HOST_TOOLS_TRACER_PACKAGE_NAME ]).any?
HOST_TOOLS_TRACER_PACKAGE_NAME ]).any? ||
self.host.installed_debs.where("#{Katello::InstalledDeb.table_name}.name" => [ "python-#{HOST_TOOLS_TRACER_PACKAGE_NAME}",
"python3-#{HOST_TOOLS_TRACER_PACKAGE_NAME}",
HOST_TOOLS_TRACER_PACKAGE_NAME ]).any?
end

def host_tools_installed?
host.installed_packages.where("#{Katello::InstalledPackage.table_name}.name" => [ "python-#{HOST_TOOLS_PACKAGE_NAME}",
"python3-#{HOST_TOOLS_PACKAGE_NAME}",
HOST_TOOLS_PACKAGE_NAME ]).any?
HOST_TOOLS_PACKAGE_NAME ]).any? ||
host.installed_debs.where("#{Katello::InstalledDeb.table_name}.name" => [ "python-#{HOST_TOOLS_PACKAGE_NAME}",
"python3-#{HOST_TOOLS_PACKAGE_NAME}",
HOST_TOOLS_PACKAGE_NAME ]).any?
end

def update_errata_status
Expand Down

0 comments on commit ac0b74a

Please sign in to comment.