    # File lib/chef/provider/package.rb, line 168
          def preseed_resource(name, version)
            # A directory in our cache to store this cookbook's preseed files in
            file_cache_dir = Chef::FileCache.create_cache_path("preseed/#{@new_resource.cookbook_name}")
            # The full path where the preseed file will be stored
            cache_seed_to = "#{file_cache_dir}/#{name}-#{version}.seed"

            Chef::Log.debug("#{@new_resource} fetching preseed file to #{cache_seed_to}")

            begin
              remote_file = Chef::Resource::Template.new(cache_seed_to, run_context)
              remote_file.cookbook_name = @new_resource.cookbook_name
              remote_file.source(@new_resource.response_file)
              remote_file.backup(false)
              provider = Chef::Platform.provider_for_resource(remote_file)
              provider.template_location
            rescue
              Chef::Log.debug("#{@new_resource} fetching preseed file via Template resource failed, fallback to CookbookFile resource")
              remote_file = Chef::Resource::CookbookFile.new(cache_seed_to, run_context)
              remote_file.cookbook_name = @new_resource.cookbook_name
              remote_file.source(@new_resource.response_file)
              remote_file.backup(false)
            end

            remote_file
          end