    # File lib/chef/provider/package/ips.rb, line 51
            def check_package_state(package)
              Chef::Log.debug("Checking package status for #{package}")
              installed = false
              depends = false

              shell_out!("pkg info -r #{package}").stdout.each_line do |line|
                case line
                when /^\s+State: Installed/
                  installed = true
                when /^\s+Version: (.*)/
                  @candidate_version = $1.split[0]
                  if installed
                    @current_resource.version($1)
                  else
                    @current_resource.version(nil)
                  end
                end
              end

              return installed
            end