    # File lib/chef/provider/package/yum.rb, line 961
            def load_current_resource
              if flush_cache[:before]
                @yum.reload
              end

              # At this point package_name could be:
              #
              # 1) a package name, eg: "foo"
              # 2) a package name.arch, eg: "foo.i386"
              # 3) or a dependency, eg: "foo >= 1.1"

              # Check if we have name or name+arch which has a priority over a dependency
              unless @yum.package_available?(@new_resource.package_name)
                # If they aren't in the installed packages they could be a dependency
                parse_dependency
              end

              # Don't overwrite an existing arch
              unless arch
                parse_arch
              end

              @current_resource = Chef::Resource::Package.new(@new_resource.name)
              @current_resource.package_name(@new_resource.package_name)

              if @new_resource.source
                unless ::File.exists?(@new_resource.source)
                  raise Chef::Exceptions::Package, "Package #{@new_resource.name} not found: #{@new_resource.source}"
                end

                Chef::Log.debug("#{@new_resource} checking rpm status")
                status = popen4("rpm -qp --queryformat '%{NAME} %{VERSION}-%{RELEASE}\n' #{@new_resource.source}") do |pid, stdin, stdout, stderr|
                  stdout.each do |line|
                    case line
                    when /([\w\d_.-]+)\s([\w\d_.-]+)/
                      @current_resource.package_name($1)
                      @new_resource.version($2)
                    end
                  end
                end
              end

              if @new_resource.version
                new_resource = "#{@new_resource.package_name}-#{@new_resource.version}#{yum_arch}"
              else
                new_resource = "#{@new_resource.package_name}#{yum_arch}"
              end

              Chef::Log.debug("#{@new_resource} checking yum info for #{new_resource}")

              installed_version = @yum.installed_version(@new_resource.package_name, arch)
              @current_resource.version(installed_version)

              @candidate_version = @yum.candidate_version(@new_resource.package_name, arch)

              Chef::Log.debug("#{@new_resource} installed version: #{installed_version || "(none)"} candidate version: " +
                              "#{@candidate_version || "(none)"}")

              @current_resource
            end