Details
-
Bug
-
Resolution: Fixed
-
Major
-
7.6
-
None
-
XSI-124
Description
Extract from spec file:
%postun if grep -q "^Theme *= *xenserver *$" "%{plymouthconf}"; then /usr/sbin/plymouth-set-default-theme text %{regenerate_initrd_postun} fi
=> this is executed not only when the package is uninstalled, but also when it is upgraded.
It should probably be:
%postun if [ $1 -eq 0 ]; then if grep -q "^Theme *= *xenserver *$" "%{plymouthconf}"; then /usr/sbin/plymouth-set-default-theme text %{regenerate_initrd_postun} fi fi
And since %{regenerate_initrd_postun} evaluates to
if [ $1 -eq 0 ]; then dracut -f /boot/initrd-4.4.0+10.img 4.4.0+10 else > /var/lib/rpm-state/regenerate-initrd-4.4.0+10 fi
one may consider extracting it from the if blocks so that either part of its own if block gets executed depending on the context.