[Tarantool-patches] [PATCH v1] update_repo: correct fix for RPMs on missing metadata

Alexander Turenko alexander.turenko at tarantool.org
Mon Jul 27 17:18:40 MSK 2020


On Mon, Jul 27, 2020 at 04:11:06PM +0300, Alexander V. Tikhonov wrote:
> Found that removing RPMs additional call to its removement is
> needed, when no metadata was found.
> ---
> 
> Github: https://github.com/tarantool/tarantool/tree/avtikhon/correct_rpm_remove
> 
>  tools/update_repo.sh | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/tools/update_repo.sh b/tools/update_repo.sh
> index 5a68e3e05..d9b91a753 100755
> --- a/tools/update_repo.sh
> +++ b/tools/update_repo.sh
> @@ -869,6 +869,13 @@ function remove_rpm {
>          done
>      done
>  
> +    # remove all found file by the given pattern in options

I would describe the case a bit: the loop above already delete files,
which are present in the metadata. However it is possible that some
broken update left orphan files: they are present in the storage, but
does not mentioned in the metadata.

> +    for suffix in 'x86_64' 'noarch' 'src'; do
> +        file="$bucket_path/$packpath/${remove}-1.${os}${option_dist}.${suffix}.rpm"
> +        $aws ls $file || continue
> +        $aws rm $file
> +    done
> +

I don't mind, however I'm unable to review the file thoroughly.


More information about the Tarantool-patches mailing list