Skip to content
This repository has been archived by the owner on May 14, 2021. It is now read-only.

Do not mess with scl repos if package is already available #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions lib/poise_languages/scl/resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ class Provider < Chef::Provider
# @return [void]
def action_install
notifying_block do
install_scl_repo
flush_yum_cache
if Chef::Provider::Package::Yum::YumCache.instance.available_version(new_resource.package_name).nil?
install_scl_repo
flush_yum_cache
end
install_scl_package(:install)
install_scl_devel_package(:install) if new_resource.dev_package
end
Expand All @@ -81,8 +83,10 @@ def action_install
# @return [void]
def action_upgrade
notifying_block do
install_scl_repo
flush_yum_cache
if Chef::Provider::Package::Yum::YumCache.instance.available_version(new_resource.package_name).nil?
install_scl_repo
flush_yum_cache
end
install_scl_package(:upgrade)
install_scl_devel_package(:upgrade) if new_resource.dev_package
end
Expand Down