lib/chef/provider/package.rb in chef-10.14.4 vs lib/chef/provider/package.rb in chef-10.16.0.rc.0
- old
+ new
@@ -76,19 +76,21 @@
end
end
end
description = install_version ? "version #{install_version} of" : ""
converge_by("install #{description} package #{@new_resource.package_name}") do
+ @new_resource.version(install_version)
install_package(@new_resource.package_name, install_version)
end
end
def action_upgrade
if candidate_version.nil?
Chef::Log.debug("#{@new_resource} no candidate version - nothing to do")
elsif @current_resource.version == candidate_version
Chef::Log.debug("#{@new_resource} is at the latest version - nothing to do")
else
+ @new_resource.version(candidate_version)
orig_version = @current_resource.version || "uninstalled"
converge_by("upgrade package #{@new_resource.package_name} from #{orig_version} to #{candidate_version}") do
status = upgrade_package(@new_resource.package_name, candidate_version)
Chef::Log.info("#{@new_resource} upgraded from #{orig_version} to #{candidate_version}")
end