fix plugin symlinks handling better (#238337) Resolves: #238337

This commit is contained in:
Nils Philippsen 2007-04-30 19:37:26 +00:00
parent dcbc8a0be0
commit fc7bffd8b7

View File

@ -43,7 +43,7 @@ Version: 2.2.14
%define age 0 %define age 0
%define minorver 200 %define minorver 200
%define microver %(ver=%{version}; echo ${ver##*.*.}) %define microver %(ver=%{version}; echo ${ver##*.*.})
Release: 3%{?dist} Release: 4%{?dist}
Epoch: 2 Epoch: 2
License: GPL, LGPL License: GPL, LGPL
Group: Applications/Multimedia Group: Applications/Multimedia
@ -269,16 +269,24 @@ install -m 0755 gimp-plugin-mgr %{buildroot}%{_sbindir}/gimp-plugin-mgr
%clean %clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
%pre
# First, remove old symlinks which are possibly in an old location (before a
# major version update)
if [ -x "%{_sbindir}/gimp-plugin-mgr" ]; then
%{_sbindir}/gimp-plugin-mgr --uninstall '*'
fi
%post %post
/usr/bin/update-desktop-database %{_datadir}/applications /usr/bin/update-desktop-database %{_datadir}/applications
touch --no-create %{_datadir}/icons/hicolor touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then if [ -x /usr/bin/gtk-update-icon-cache ]; then
gtk-update-icon-cache -q %{_datadir}/icons/hicolor gtk-update-icon-cache -q %{_datadir}/icons/hicolor
fi fi
%{_sbindir}/gimp-plugin-mgr --uninstall '*' # Then re-add the symlinks
%{_sbindir}/gimp-plugin-mgr --install '*' %{_sbindir}/gimp-plugin-mgr --install '*'
%preun %preun
# Only delete symlinks when uninstalling
if [ "$1" = "0" ]; then if [ "$1" = "0" ]; then
%{_sbindir}/gimp-plugin-mgr --uninstall '*' %{_sbindir}/gimp-plugin-mgr --uninstall '*'
fi fi
@ -413,6 +421,9 @@ fi
%{_libdir}/pkgconfig/* %{_libdir}/pkgconfig/*
%changelog %changelog
* Mon Apr 30 2007 Nils Philippsen <nphilipp@redhat.com> - 2:2.2.14-4
- fix plugin symlinks handling better (#238337)
* Mon Apr 30 2007 Nils Philippsen <nphilipp@redhat.com> - 2:2.2.14-3 * Mon Apr 30 2007 Nils Philippsen <nphilipp@redhat.com> - 2:2.2.14-3
- don't erroneously delete symlinks to external plugins when updating (#238337) - don't erroneously delete symlinks to external plugins when updating (#238337)