Class: Puppet::Provider::Package

Inherits:
Puppet::Provider show all
Defined in:
lib/puppet/provider/package.rb

Defined Under Namespace

Classes: Windows

Constant Summary

Constants inherited from Puppet::Provider

Confine

Constants included from Util

Util::AbsolutePathPosix, Util::AbsolutePathWindows, Util::DEFAULT_POSIX_MODE, Util::DEFAULT_WINDOWS_MODE

Constants included from Util::POSIX

Util::POSIX::LOCALE_ENV_VARS, Util::POSIX::USER_ENV_VARS

Constants included from Util::SymbolicFileMode

Util::SymbolicFileMode::SetGIDBit, Util::SymbolicFileMode::SetUIDBit, Util::SymbolicFileMode::StickyBit, Util::SymbolicFileMode::SymbolicMode, Util::SymbolicFileMode::SymbolicSpecialToBit

Constants included from Util::Docs

Util::Docs::HEADER_LEVELS

Instance Attribute Summary

Attributes inherited from Puppet::Provider

#model, #resource

Attributes included from Util::Docs

#doc, #nodoc

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Puppet::Provider

#<=>, #clear, #command, command, commands, declared_feature?, default?, defaultfor, execfail, #execfail, execpipe, #execpipe, execute, #execute, #get, has_command, #initialize, initvars, instances, make_command_methods, mk_resource_methods, #name, optional_commands, post_resource_eval, #set, specificity, supports_parameter?, #to_s

Methods included from Util::Logging

#clear_deprecation_warnings, #deprecation_warning, #format_exception, #get_deprecation_offender, #log_and_raise, #log_deprecations_to_file, #log_exception, #send_log

Methods included from Util

absolute_path?, activerecord_version, benchmark, binread, chuser, classproxy, deterministic_rand, execfail, execpipe, execute, exit_on_fail, logmethods, memory, path_to_uri, pretty_backtrace, proxy, replace_file, safe_posix_fork, symbolizehash, thinmark, uri_to_path, which, withenv, withumask

Methods included from Util::POSIX

#get_posix_field, #gid, #idfield, #methodbyid, #methodbyname, #search_posix_field, #uid

Methods included from Util::SymbolicFileMode

#normalize_symbolic_mode, #symbolic_mode_to_int, #valid_symbolic_mode?

Methods included from Util::Docs

#desc, #dochook, #doctable, #markdown_definitionlist, #markdown_header, #nodoc?, #pad, scrub

Methods included from Util::Warnings

clear_warnings, debug_once, notice_once, warnonce

Methods included from Confiner

#confine, #confine_collection, #suitable?

Methods included from Util::Errors

#adderrorcontext, #devfail, #error_context, #exceptwrap, #fail

Constructor Details

This class inherits a constructor from Puppet::Provider

Class Method Details

.prefetch(packages) ⇒ Object

Prefetch our package list, yo.



3
4
5
6
7
8
9
# File 'lib/puppet/provider/package.rb', line 3

def self.prefetch(packages)
  instances.each do |prov|
    if pkg = packages[prov.name]
      pkg.provider = prov
    end
  end
end

Instance Method Details

#flushObject

Clear out the cached values.



12
13
14
# File 'lib/puppet/provider/package.rb', line 12

def flush
  @property_hash.clear
end

#propertiesObject

Look up the current status.



17
18
19
20
21
22
23
# File 'lib/puppet/provider/package.rb', line 17

def properties
  if @property_hash.empty?
    @property_hash = query || {:ensure => :absent}
    @property_hash[:ensure] = :absent if @property_hash.empty?
  end
  @property_hash.dup
end

#validate_source(value) ⇒ Object



25
26
27
# File 'lib/puppet/provider/package.rb', line 25

def validate_source(value)
  true
end