From e8953b5a734611677f535bd5bd36be8927e13aa7 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Jun 17 2008 17:43:57 +0000 Subject: Fix ldconfig to be run on -libs not on the main package. Fix main package and plugins not to reset inappropriately. --- diff --git a/plymouth.spec b/plymouth.spec index f44b5f0..1cb04b2 100644 --- a/plymouth.spec +++ b/plymouth.spec @@ -86,32 +86,41 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} \; %clean rm -rf $RPM_BUILD_ROOT -%post -p /sbin/ldconfig -%postun -p /sbin/ldconfig - -%preun -if [ $1 -eq 1 ]; then - %{_sbindir}/plymouth-set-default-plugin --reset +%postun +echo plymouth postun "$@" +if [ $1 -eq 0 ]; then + rm %{_libdir}/plymouth/default.so fi +%post libs -p /sbin/ldconfig +%postun libs -p /sbin/ldconfig + %post plugin-spinfinity +echo plymouth-spinfinity post "$@" if [ $1 -eq 1 ]; then %{_sbindir}/plymouth-set-default-plugin spinfinity fi %postun plugin-spinfinity +echo plymouth-spinfinity postun "$@" if [ $1 -eq 0 ]; then - %{_sbindir}/plymouth-set-default-plugin --reset + if [ "$(%{_sbindir}/plymouth-set-default-plugin)" == "spinfinity" ]; then + %{_sbindir}/plymouth-set-default-plugin --reset + fi fi %post plugin-fade-in +echo plymouth-fade-in post "$@" if [ $1 -eq 1 ]; then %{_sbindir}/plymouth-set-default-plugin fade-in fi %postun plugin-fade-in +echo plymouth-fade-in postun "$@" if [ $1 -eq 0 ]; then - %{_sbindir}/plymouth-set-default-plugin --reset + if [ "$(%{_sbindir}/plymouth-set-default-plugin)" == "fade-in" ]; then + %{_sbindir}/plymouth-set-default-plugin --reset + fi fi %files