@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
dataset/ETHPy150Open ClusterHQ/flocker/admin/release.py/update_repo