![](https://seccdn.libravatar.org/avatar/2b43d424e288433c003051dc7411b1bd.jpg?s=120&d=mm&r=g)
On Mo, 2021-05-31 at 11:01 +0200, Thorsten Kukuk wrote:
On Mon, May 31, Martin Wilck wrote:
In my experiments (which just involved updating suse-module-tools alone), rpm created the (new) .rpmsave files after invoking %post. Is that dependent on the rpm version, or some properties of the transaction, or just some random ordering?
Defined order ;)
Look at pam.spec:
%pre test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i}.rpmsave.old
%posttrans test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i} ||:
Thorsten
I thought I needed to add another test to check if I was updating from a version with config files in /etc to one with files in (/usr)/lib. I realize now that after this update (i.e. once none of the files under /etc are owned by my package any more), no more files will be renamed to .rpmsave. That means I can simplify my code. Thanks, Martin