lib/chef/provider/package/dpkg.rb
# semantics of dpkg properties:
#
# new_resource.name is always an array for this resource
# new_resource.package_name is always an array for this resource
# new_resource.source is always an array and may be [ nil ] for this resource.  properly use #sources or
#    #name_sources to also get the automatic package-name-to-source-conversion.  this will never be nil?
#
semantics of dpkg properties:
new_resource.name is always an array for this resource
new_resource.package_name is always an array for this resource
new_resource.source is always an array and may be [ nil ] for this resource.  properly use #sources or
name_sources to also get the automatic package-name-to-source-conversion.
semantics of dpkg properties : new_resource . name is always an array for this resource new_resource . package_name is always an array for this resource new_resource . source is always an array and may be [ nil ] for this resource . properly use #sources or name_sources to also get the automatic package - name - to - source - conversion .
def define_resource_requirements
          super
          requirements.assert(:install, :upgrade) do |a|
            a.assertion { !sources.compact.empty? }
            a.failure_message Chef::Exceptions::Package, "#{new_resource} the source property is required for action :install or :upgrade"
          end
          requirements.assert(:install, :upgrade) do |a|
            a.assertion { source_files_exist? }
            a.failure_message Chef::Exceptions::Package, "#{new_resource} source file(s) do not exist: #{missing_sources}"
            a.whyrun "Assuming they would have been previously created."
          end
        end
def define_resource_requirements super requirements . assert ( :install , :upgrade ) do | a | a . assertion { ! sources . compact . empty? } a . failure_message Chef :: Exceptions :: Package , "#{new_resource} the source property is required for action :install or :upgrade" end requirements . assert ( :install , :upgrade ) do | a | a . assertion { source_files_exist? } a . failure_message Chef :: Exceptions :: Package , "#{new_resource} source file(s) do not exist: #{missing_sources}" a . whyrun "Assuming they would have been previously created." end end
semantics of dpkg properties:
new_resource.name is always an array for this resource
new_resource.package_name is always an array for this resource
new_resource.source is always an array and may be [ nil ] for this resource.
semantics of dpkg properties : new_resource . name is always an array for this resource new_resource . package_name is always an array for this resource new_resource . source is always an array and may be [ nil ] for this resource .