    # File lib/chef/provider/package.rb, line 38
          def action_install
            # If we specified a version, and it's not the current version, move to the specified version
            if @new_resource.version != nil && @new_resource.version != @current_resource.version
              install_version = @new_resource.version
            # If it's not installed at all, install it
            elsif @current_resource.version == nil
              install_version = candidate_version
            else
              Chef::Log.debug("#{@new_resource} is already installed - nothing to do")
              return
            end

            unless install_version
              raise(Chef::Exceptions::Package, "No version specified, and no candidate version available for #{@new_resource.package_name}")
            end

            # We need to make sure we handle the preseed file
            if @new_resource.response_file
              preseed_package(@new_resource.package_name, install_version)
            end

            status = install_package(@new_resource.package_name, install_version)
            if status
              @new_resource.updated_by_last_action(true)
            end
            Chef::Log.info("#{@new_resource} installed version #{install_version}")
          end