class Chef::Provider::Package::Yum::YumCache
Public Instance Methods
Source
# File lib/chef/provider/package/yum/yum_cache.rb, line 60 def available_version(name, arch = nil) p = python_helper.package_query(:whatavailable, name, arch: arch) "#{p.version}.#{p.arch}" unless p.version.nil? end
Source
# File lib/chef/provider/package/yum/yum_cache.rb, line 65 def installed_version(name, arch = nil) p = python_helper.package_query(:whatinstalled, name, arch: arch) "#{p.version}.#{p.arch}" unless p.version.nil? end
Source
# File lib/chef/provider/package/yum/yum_cache.rb, line 70 def package_available?(name, arch = nil) p = python_helper.package_query(:whatavailable, name, arch: arch) !p.version.nil? end
Source
# File lib/chef/provider/package/yum/yum_cache.rb, line 85 def python_helper @python_helper ||= PythonHelper.instance end
@api private
Source
# File lib/chef/provider/package/yum/yum_cache.rb, line 36 def refresh python_helper.restart end
Source
# File lib/chef/provider/package/yum/yum_cache.rb, line 40 def reload python_helper.restart end
Source
# File lib/chef/provider/package/yum/yum_cache.rb, line 44 def reload_installed python_helper.restart end
Source
# File lib/chef/provider/package/yum/yum_cache.rb, line 48 def reload_provides python_helper.restart end
Source
# File lib/chef/provider/package/yum/yum_cache.rb, line 52 def reset python_helper.restart end
Source
# File lib/chef/provider/package/yum/yum_cache.rb, line 56 def reset_installed python_helper.restart end
Source
# File lib/chef/provider/package/yum/yum_cache.rb, line 79 def version_available?(name, version, arch = nil) p = python_helper.package_query(:whatavailable, name, version: version, arch: arch) !p.version.nil? end
NOTE that it is the responsibility of the python_helper
to get these APIs correct and we do not do any validation here that the e.g. version or arch matches the requested value (because the bigger issue there is a buggy+broken python_helper
– so don’t try to fix those kinds of bugs here)