[eclipse] Fix uninstallation.
sami wagiaalla
swagiaal at fedoraproject.org
Tue Oct 4 18:14:42 UTC 2011
commit c4addfdfc2193b339cb153b8df4e7eb838d8faed
Author: Sami Wagiaalla <swagiaal at redhat.com>
Date: Mon Oct 3 14:48:49 2011 -0400
Fix uninstallation.
- Remove all metadata files created by the reconciler before
uninstallation.
eclipse.spec | 35 +++++++++++++++++++++++++++++++++++
1 files changed, 35 insertions(+), 0 deletions(-)
---
diff --git a/eclipse.spec b/eclipse.spec
index 6c39754..02991c9 100644
--- a/eclipse.spec
+++ b/eclipse.spec
@@ -294,6 +294,37 @@ sed -i "s/@PDEBUILDVERSION@/$PDEBUILDVERSION/g" \
# by running the reconciler in %post platform
rm -rf %{_libdir}/%{name}/p2/org.eclipse.equinox.p2.engine/profileRegistry/PlatformProfile.profile/*
+%preun platform
+# Because of our use of the reconciler there are files which are created
+# during installation which rpm does not know about. These files must
+# be removed here.
+
+# Remove all configuration files created by the reconciler so that we
+# can have a clean uninstall.
+rm -rf %{_libdir}/%{name}/p2/org.eclipse.equinox.p2.core/cache
+rm -rf %{_libdir}/%{name}/configuration/org.eclipse.equinox.app
+rm -rf %{_libdir}/%{name}/configuration/org.eclipse.core.runtime
+rm -rf %{_libdir}/%{name}/configuration/org.eclipse.osgi/bundles/*/data
+rm -rf %{_libdir}/%{name}/configuration/org.eclipse.equinox.source/
+rm -rf %{_libdir}/%{name}/configuration/org.eclipse.update/
+
+# Remove .bundledata* .lazy* .manager .state*
+rm -rf %{_libdir}/%{name}/configuration/org.eclipse.osgi/.bundledata*
+rm -rf %{_libdir}/%{name}/configuration/org.eclipse.osgi/.lazy*
+rm -rf %{_libdir}/%{name}/configuration/org.eclipse.osgi/.manager
+rm -rf %{_libdir}/%{name}/configuration/org.eclipse.osgi/.state*
+
+# Delete all empty bundle directories.
+find %{_libdir}/%{name}/configuration/org.eclipse.osgi/bundles/ -depth -type d -empty -delete
+
+# Delete orphaned profile files
+find %{_libdir}/%{name}/p2/org.eclipse.equinox.p2.engine/profileRegistry/PlatformProfile.profile/* | while read file
+do
+ rpm -qf "$file" >/dev/null
+ if [ $? != 0 ]; then rm -f $file; fi
+done
+
+
%post platform
touch --no-create %{_datadir}/icons/hicolor
if [ -x /usr/bin/gtk-update-icon-cache ]; then
@@ -559,6 +590,10 @@ rm -rf %{_bindir}/efj/
%changelog
* Mon Oct 3 2011 Sami Wagiaalla <swagiaal at redhat.com> 1:3.7.0-5
+- Remove all metadata files created by the reconciler before
+ uninstallation.
+
+* Mon Oct 3 2011 Sami Wagiaalla <swagiaal at redhat.com> 1:3.7.0-5
- Install .so extraction file.
- Extract .so files when the reconciler is run with -clean
More information about the scm-commits
mailing list