    # File lib/chef/provider/package/pacman.rb, line 28
            def load_current_resource
              @current_resource = Chef::Resource::Package.new(@new_resource.name)
              @current_resource.package_name(@new_resource.package_name)

              @current_resource.version(nil)

              Chef::Log.debug("#{@new_resource} checking pacman for #{@new_resource.package_name}")
              status = popen4("pacman -Qi #{@new_resource.package_name}") do |pid, stdin, stdout, stderr|
                stdout.each do |line|
                  case line
                  when /^Version(\s?)*: (.+)$/
                    Chef::Log.debug("#{@new_resource} current version is #{$2}")
                    @current_resource.version($2)
                  end
                end
              end

              unless status.exitstatus == 0 || status.exitstatus == 1
                raise Chef::Exceptions::Package, "pacman failed - #{status.inspect}!"
              end

              @current_resource
            end