From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp51.i.mail.ru (smtp51.i.mail.ru [94.100.177.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id E5D2F445320 for ; Fri, 7 Aug 2020 19:10:38 +0300 (MSK) Date: Fri, 7 Aug 2020 19:10:35 +0300 From: "Alexander V. Tikhonov" Message-ID: <20200807160953.GA8091@hpalx> References: <9d538c87b2a0106b325c1ec104206a9f38f207df.1595855406.git.avtikhon@tarantool.org> <20200727141840.fisd4tim7fxel55u@tkn_work_nb> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200727141840.fisd4tim7fxel55u@tkn_work_nb> Subject: Re: [Tarantool-patches] [PATCH v1] update_repo: correct fix for RPMs on missing metadata List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Turenko Cc: tarantool-patches@dev.tarantool.org Hi Alexander, thanks a lot for the review and the message for the code. I've used it for commit comments and code message. On Mon, Jul 27, 2020 at 05:18:40PM +0300, Alexander Turenko wrote: > 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.