[packages/rpm/rpm.org] - unlock rpmdb in case we're rebuilding db from rpm.org to rpm.org, post transaction scriptlet sho

Jan Rękorajski baggins at pld-linux.org
Wed Jan 20 00:44:13 CET 2021


On Tue, 12 Jan 2021, Elan Ruusamäe wrote:

> 
> On 12.01.2021 09:40, Jan Rękorajski wrote:
> > All you could see is "no such file or directory", which is just noise.
> > This script was like this for years.
> 
> rm -f will not say "no such file or directory" error. try it.
> 
> but, it could say unable to delete in case the removed target is 
> mountpoint and it's "busy", which is error that should be shown, as i 
> will likely be reason for errors that will follow. in fact, the script 
> should abort if the operation is not success. i.e path to be deleted 
> can't be deleted.
> 
> unlikely to happen for this very particular case, but we have this kind 
> of "hide everything pattern" used everywhere, because stupid reasons 
> like above "has been this for years, i don't know why, i'll just 
> replicate same code"

It is this way because I wrote it this way 9 years ago. Basically,
we don't care if those rm's fail. And if you have such a convoluted
setup that they may fail because of mount points, then, sorry,
but you are on your own.

In case these files/dirs create an issue then rebuilddb will complain
and fail. And I prefer to fail on a real bug than on the intermittent
issue.

-- 
Jan Rękorajski                    | PLD/Linux
SysAdm | baggins<at>pld-linux.org | http://www.pld-linux.org/


More information about the pld-devel-en mailing list