@do
def update_repo(package_directory, target_bucket, target_key, source_repo, packages, flocker_version, distribution):
 package_directory.createDirectory()
 package_type = distribution.package_type()
 (yield Effect(DownloadS3KeyRecursively(source_bucket=target_bucket, source_prefix=target_key, target_path=package_directory, filter_extensions=(('.' + package_type.value),))))
 downloaded_packages = (yield Effect(DownloadPackagesFromRepository(source_repo=source_repo, target_path=package_directory, packages=packages, flocker_version=flocker_version, distribution=distribution)))
 new_metadata = (yield Effect(CreateRepo(repository_path=package_directory, distribution=distribution)))
 (yield Effect(UploadToS3Recursively(source_path=package_directory, target_bucket=target_bucket, target_key=target_key, files=(downloaded_packages | new_metadata))))

@ do def update_repo ( package_directory , target_bucket , target_key , source_repo , packages , flocker_version , distribution ) : package_directory . createDirectory ( ) package_type = distribution . package_type ( ) ( yield Effect ( DownloadS3KeyRecursively ( source_bucket = target_bucket , source_prefix = target_key , target_path = package_directory , filter_extensions = ( ( '.' + package_type . value ) , ) ) ) ) downloaded_packages = ( yield Effect ( DownloadPackagesFromRepository ( source_repo = source_repo , target_path = package_directory , packages = packages , flocker_version = flocker_version , distribution = distribution ) ) ) new_metadata = ( yield Effect ( CreateRepo ( repository_path = package_directory , distribution = distribution ) ) ) ( yield Effect ( UploadToS3Recursively ( source_path = package_directory , target_bucket = target_bucket , target_key = target_key , files = ( downloaded_packages | new_metadata ) ) ) )
update target_bucket yum repository with packages from source_repo repository .