From fc7bffd8b76c35701f37158d58432ed033564dfe Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Mon, 30 Apr 2007 19:37:26 +0000 Subject: [PATCH] fix plugin symlinks handling better (#238337) Resolves: #238337 --- gimp.spec | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/gimp.spec b/gimp.spec index b2d27f3..e6b5066 100644 --- a/gimp.spec +++ b/gimp.spec @@ -43,7 +43,7 @@ Version: 2.2.14 %define age 0 %define minorver 200 %define microver %(ver=%{version}; echo ${ver##*.*.}) -Release: 3%{?dist} +Release: 4%{?dist} Epoch: 2 License: GPL, LGPL Group: Applications/Multimedia @@ -269,16 +269,24 @@ install -m 0755 gimp-plugin-mgr %{buildroot}%{_sbindir}/gimp-plugin-mgr %clean [ -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 /usr/bin/update-desktop-database %{_datadir}/applications touch --no-create %{_datadir}/icons/hicolor if [ -x /usr/bin/gtk-update-icon-cache ]; then gtk-update-icon-cache -q %{_datadir}/icons/hicolor fi -%{_sbindir}/gimp-plugin-mgr --uninstall '*' +# Then re-add the symlinks %{_sbindir}/gimp-plugin-mgr --install '*' %preun +# Only delete symlinks when uninstalling if [ "$1" = "0" ]; then %{_sbindir}/gimp-plugin-mgr --uninstall '*' fi @@ -413,6 +421,9 @@ fi %{_libdir}/pkgconfig/* %changelog +* Mon Apr 30 2007 Nils Philippsen - 2:2.2.14-4 +- fix plugin symlinks handling better (#238337) + * Mon Apr 30 2007 Nils Philippsen - 2:2.2.14-3 - don't erroneously delete symlinks to external plugins when updating (#238337)