lib/chef/provider/package.rb
# Returns the package names which need to be modified.  If the resource was called with an array of packages
# then this will return an array of packages to update (may have 0 or 1 entries).  If the resource was called
# with a non-array package_name to manage then this will return a string rather than an Array.  The output
# of this is meant to be fed into subclass interfaces to install/upgrade packages and not all of them are
# Array-aware.
#
# @return [String, Array<String>] package_name(s) to actually update/install
Returns the package names which need to be modified.  If the resource was called with an array of packages
then this will return an array of packages to update (may have 0 or 1 entries).  If the resource was called
with a non-array package_name to manage then this will return a string rather than an Array.  The output
of this is meant to be fed into subclass interfaces to install/upgrade packages and not all of them are
Array-aware.
Returns the package names which need to be modified . If the resource was called with an array of packages then this will return an array of packages to update ( may have 0 or 1 entries ) . If the resource was called with a non - array package_name to manage then this will return a string rather than an Array . The output of this is meant to be fed into subclass interfaces to install / upgrade packages and not all of them are Array - aware .
def package_names_for_targets
        package_names_for_targets = []
        target_version_array.each_with_index do |target_version, i|
          if !target_version.nil?
            package_name = package_name_array[i]
            package_names_for_targets.push(package_name)
          else
            package_names_for_targets.push(nil) if allow_nils?
          end
        end
        multipackage? ? package_names_for_targets : package_names_for_targets[0]
      end
def package_names_for_targets package_names_for_targets = [ ] target_version_array . each_with_index do | target_version , i | if ! target_version . nil? package_name = package_name_array [ i ] package_names_for_targets . push ( package_name ) else package_names_for_targets . push ( nil ) if allow_nils? end end multipackage? ? package_names_for_targets : package_names_for_targets [ 0 ] end
Returns the package names which need to be modified.
Returns the package names which need to be modified .
package_name(s) to actually update/install
package_name ( s ) to actually update / install
String, Array<String>