Update the dconf and icon cache rpm scriptlets
Most importantly, make sure their output is redirected to /dev/null. End users aren't supposed to see the numerous warnings generated by e.g. glib-compile-schemas. Also move gtk-update-icon-cache to %posttrans as per http://fedoraproject.org/wiki/Packaging:ScriptletSnippets
This commit is contained in:
parent
c31870b8fb
commit
f7052d65f8
30
ibus.spec
30
ibus.spec
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
Name: ibus
|
Name: ibus
|
||||||
Version: 1.4.99.20120317
|
Version: 1.4.99.20120317
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
Summary: Intelligent Input Bus for Linux OS
|
Summary: Intelligent Input Bus for Linux OS
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
@ -321,9 +321,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
%post
|
%post
|
||||||
# recreate icon cache
|
# recreate icon cache
|
||||||
touch --no-create %{_datadir}/icons/hicolor || :
|
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
|
||||||
[ -x %{_bindir}/gtk-update-icon-cache ] && \
|
|
||||||
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
|
|
||||||
|
|
||||||
%{_sbindir}/alternatives --install %{_sysconfdir}/X11/xinit/xinputrc xinputrc %{_xinputconf} 83 || :
|
%{_sbindir}/alternatives --install %{_sysconfdir}/X11/xinit/xinputrc xinputrc %{_xinputconf} 83 || :
|
||||||
|
|
||||||
@ -349,27 +347,24 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
# recreate icon cache
|
if [ "$1" -eq 0 ]; then
|
||||||
touch --no-create %{_datadir}/icons/hicolor || :
|
# recreate icon cache
|
||||||
[ -x %{_bindir}/gtk-update-icon-cache ] && \
|
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
|
||||||
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
|
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||||
|
|
||||||
if [ "$1" = "0" ]; then
|
|
||||||
%{_sbindir}/alternatives --remove xinputrc %{_xinputconf} || :
|
%{_sbindir}/alternatives --remove xinputrc %{_xinputconf} || :
|
||||||
# if alternative was set to manual, reset to auto
|
# if alternative was set to manual, reset to auto
|
||||||
[ -L %{_sysconfdir}/alternatives/xinputrc -a "`readlink %{_sysconfdir}/alternatives/xinputrc`" = "%{_xinputconf}" ] && %{_sbindir}/alternatives --auto xinputrc || :
|
[ -L %{_sysconfdir}/alternatives/xinputrc -a "`readlink %{_sysconfdir}/alternatives/xinputrc`" = "%{_xinputconf}" ] && %{_sbindir}/alternatives --auto xinputrc || :
|
||||||
fi
|
|
||||||
%if %with_dconf
|
%if %with_dconf
|
||||||
if [ $1 -eq 0 ]; then
|
glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
|
||||||
glib-compile-schemas %{_datadir}/glib-2.0/schemas
|
|
||||||
fi
|
|
||||||
%endif
|
%endif
|
||||||
|
fi
|
||||||
|
|
||||||
%posttrans
|
%posttrans
|
||||||
|
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||||
%if %with_dconf
|
%if %with_dconf
|
||||||
if [ $1 -eq 0 ]; then
|
glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
|
||||||
glib-compile-schemas %{_datadir}/glib-2.0/schemas
|
|
||||||
fi
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%post libs -p /sbin/ldconfig
|
%post libs -p /sbin/ldconfig
|
||||||
@ -464,6 +459,9 @@ fi
|
|||||||
%{_datadir}/gtk-doc/html/*
|
%{_datadir}/gtk-doc/html/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Apr 24 2012 Kalev Lember <kalevlember@gmail.com> - 1.4.99.20120317-4
|
||||||
|
- Update the dconf and icon cache rpm scriptlets
|
||||||
|
|
||||||
* Wed Apr 18 2012 Takao Fujiwara <tfujiwar@redhat.com> - 1.4.99.20120317-3
|
* Wed Apr 18 2012 Takao Fujiwara <tfujiwar@redhat.com> - 1.4.99.20120317-3
|
||||||
- Added a RHEL flag.
|
- Added a RHEL flag.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user