    # File lib/chef/environment.rb, line 216
        def update_cookbook_constraint_from_param(index, cookbook_constraint_spec)
          valid = true
          md = cookbook_constraint_spec.match(COMBINED_COOKBOOK_CONSTRAINT)
          if md.nil? || md[2].nil?
            valid = false
            add_cookbook_constraint_error(index, cookbook_constraint_spec)
          elsif self.class.validate_cookbook_version(md[2])
            cookbook_versions[md[1]] = md[2]
          else
            valid = false
            add_cookbook_constraint_error(index, cookbook_constraint_spec)
          end
          valid
        end