def install_package(name, version)
if @new_resource.source
run_command_with_systems_locale(
:command => "yum -d0 -e0 -y #{@new_resource.options} localinstall #{@new_resource.source}"
)
else
if @yum.version_available?(name, version, yum_arch)
run_command_with_systems_locale(
:command => "yum -d0 -e0 -y #{@new_resource.options} install #{name}-#{version}#{yum_arch}"
)
else
raise ArgumentError, "#{@new_resource.name}: Version #{version} of #{name} not found. Did you specify both version and release? (version-release, e.g. 1.84-10.fc6)"
end
end
@yum.flush
end