Fix .so removal issue.

- Stop using -clean option.
- Use -Dosgi.checkConfiguration=true when updating the platform.
- Remove cache.timestamps and .bundledata* when running the reconciler
  with -Dosgi.checkConfiguration=true.
- Do not verify %{_libdir}/%{name}/artifacts.xml.
This commit is contained in:
Sami Wagiaalla 2011-11-29 14:08:58 -05:00
parent 01556ea40d
commit 1eeb3a573c
2 changed files with 33 additions and 21 deletions

View File

@ -9,7 +9,14 @@
# A list of the files of directory that are to be backed up
config_files=("artifacts.xml" "eclipse.ini" "p2" "configuration")
if [ ! -e /var/run/eclipse/run-reconciler ]
# If the reconciler was run with the -clean options rerun the initializer.
if [[ "$@" == *-clean* ]]
then
echo "Do not run the reconciler with -clean option use -vmargs -Dosgi.checkConfiguration=true instead"
exit 0;
fi
if [ ! -e /var/run/eclipse/run-reconciler ] && [[ "$@" != *-Dosgi.checkConfiguration=true* ]]
then
echo "run-reconciler file not present. No need to run the reconciler"
exit 0
@ -27,6 +34,15 @@ fi
echo "Removing run-reconciler file"
rm -f /var/run/eclipse/run-reconciler
# if we are running the reconciler with -Dosgi.checkConfiguration=true
# probably doing an upgrade remove time stamp file(s).
if [[ "$@" == *-Dosgi.checkConfiguration=true* ]]
then
find $eclipse_dir -name cache.timestamps -delete
find $eclipse_dir -name .bundledata* -delete
fi
echo "backing up configuration files"
for file in ${config_files[@]}
do
@ -39,18 +55,8 @@ pushd $eclipse_dir
./eclipse --launcher.suppressErrors -nosplash -consolelog -application org.eclipse.equinox.p2.reconciler.application "$@"
r_exit_value=$?
# If the reconciler was run with the -clean options rerun the initializer.
if [[ "$@" == *-clean* ]]
then
echo "Running the initializer"
./eclipse --launcher.suppressErrors -cosolelog -nosplash -application org.eclipse.equinox.initializer.configInitializer -fileInitializer extract_patterns.txt
i_exit_value=$?
else
i_exit_value=0
fi
# Check exit value
if [ ! $i_exit_value -eq 0 ] || [ ! $r_exit_value -eq 0 ]
# Check exit value
if [ ! $r_exit_value -eq 0 ]
then
# Restore files
echo "Reconciler failed. Restoring files"

View File

@ -16,7 +16,7 @@ Epoch: 1
Summary: An open, extensible IDE
Name: eclipse
Version: %{eclipse_majmin}.%{eclipse_micro}
Release: 7%{?dist}
Release: 8%{?dist}
License: EPL
Group: Text Editors/Integrated Development Environments (IDE)
URL: http://www.eclipse.org/
@ -317,7 +317,7 @@ install -d -m 0710 %{buildroot}%{_localstatedir}/run/%{name}/
mkdir $RPM_BUILD_ROOT%{_sysconfdir}/rpm/
install -m 0644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/
%pre rcp
%pre platform
# Remove all the profiles that were created by the reconciler.
# this rpm will install a new profile and it will be reconciled
# by running the reconciler in %post platform
@ -347,13 +347,12 @@ rm -rf %{_libdir}/%{name}/configuration/org.eclipse.osgi/.state*
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
find %{_libdir}/%{name}/p2/org.eclipse.equinox.p2.engine/profileRegistry/PlatformProfile.profile/ | while read file
do
rpm -qf "$file" >/dev/null
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
@ -363,8 +362,8 @@ fi
# If this is an update, we run the reconciler not to provision the
# platform but to reprovision all other plugins which may have
# already been installed in the system.
if [ $1 -gt 2 ]; then
eclipse-reconciler.sh -clean > /dev/null
if [ $1 -gt 1 ]; then
eclipse-reconciler.sh -debug -vmargs -Dosgi.checkConfiguration=true >& /dev/null
fi
@ -633,7 +632,7 @@ rm -rf %{_bindir}/efj/
%{_libdir}/%{name}/plugins/org.sat4j.core_*
%{_libdir}/%{name}/plugins/org.sat4j.pb_*
# Put this in -platform since we're putting the p2 stuff here
%{_libdir}/%{name}/artifacts.xml
%verify(not md5 size mtime) %{_libdir}/%{name}/artifacts.xml
# FIXME: should we ship content.xml for the platform?
#%{_libdir}/%{name}/metadata
%verify(not md5 size mtime) %{_libdir}/%{name}/p2
@ -647,6 +646,13 @@ rm -rf %{_bindir}/efj/
%{_libdir}/%{name}/dropins/sdk
%changelog
* Tue Nov 29 2011 Sami Wagiaalla <swagiaal@redhat.com> 1:3.7.0-8
- Stop using -clean option.
- Use -Dosgi.checkConfiguration=true when updating the platform.
- Remove cache.timestamps and .bundledata* when running the reconciler
with -Dosgi.checkConfiguration=true.
- Do not verify %{_libdir}/%{name}/artifacts.xml.
* Tue Nov 29 2011 Roland Grunberg <rgrunber@redhat.com> 1:3.7.1-7
- Bump release.