Install a blank eclipse-reconciler.sh.
This commit is contained in:
parent
9d09cc7c90
commit
3f45ea928b
|
@ -1,80 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This script runs the eclipse can do the following:
|
||||
# - backup configuration files
|
||||
# - restore configuration files from backup loation
|
||||
# - run the eclipse reconciler
|
||||
# - delete the backup files.
|
||||
|
||||
# A list of the files of directory that are to be backed up
|
||||
config_files=("artifacts.xml" "eclipse.ini" "p2" "configuration")
|
||||
|
||||
run_reconciler=/var/lib/rpm-state/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 $run_reconciler ] && [[ "$@" != *-Dosgi.checkConfiguration=true* ]]
|
||||
then
|
||||
echo "run-reconciler file not present. No need to run the reconciler"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
tmp_dir=$(mktemp -d)
|
||||
echo "Tmpdir: $tmp_dir"
|
||||
|
||||
if [ -e /usr/lib64/eclipse ]
|
||||
then
|
||||
eclipse_dir=/usr/lib64/eclipse
|
||||
else
|
||||
eclipse_dir=/usr/lib/eclipse
|
||||
fi
|
||||
|
||||
echo "Removing run-reconciler file"
|
||||
rm -f $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
|
||||
echo $file
|
||||
cp -rp $eclipse_dir/$file $tmp_dir/$file
|
||||
done
|
||||
|
||||
echo "Running eclipse reconciler"
|
||||
pushd $eclipse_dir
|
||||
./eclipse --launcher.suppressErrors -nosplash -consolelog -application org.eclipse.equinox.p2.reconciler.application "$@"
|
||||
r_exit_value=$?
|
||||
|
||||
# Check exit value
|
||||
if [ ! $r_exit_value -eq 0 ]
|
||||
then
|
||||
# Restore files
|
||||
echo "Reconciler failed. Restoring files"
|
||||
for file in ${config_files[@]}
|
||||
do
|
||||
echo $file
|
||||
cp --remove-destination -Trp $tmp_dir/$file $eclipse_dir/$file
|
||||
done
|
||||
fi
|
||||
popd
|
||||
|
||||
# delete the backup files
|
||||
for file in ${config_files[@]}
|
||||
do
|
||||
rm -rf $tmp_dir/$file
|
||||
done
|
||||
|
||||
exit $r_exit_value
|
||||
# This script is used to be a dummy script for old
|
||||
# packagers which have scriptlet code which runs the
|
||||
# reconciler.
|
||||
# This file should be removed after a coupld of update
|
||||
# cycles.
|
||||
exit 0
|
||||
|
|
11
eclipse.spec
11
eclipse.spec
|
@ -17,13 +17,13 @@ Epoch: 1
|
|||
Summary: An open, extensible IDE
|
||||
Name: eclipse
|
||||
Version: %{eclipse_majmin}.%{eclipse_micro}
|
||||
Release: 0.11.I201202070800%{?dist}
|
||||
Release: 0.12.I201202070800%{?dist}
|
||||
License: EPL
|
||||
Group: Text Editors/Integrated Development Environments (IDE)
|
||||
URL: http://www.eclipse.org/
|
||||
Source0: %{download_url}eclipse-build-%{eb_sha1}.tar.xz
|
||||
Source1: %{download_url}eclipse-3.8.0-I20120207-0800-src.tar.bz2
|
||||
|
||||
Source2: eclipse-reconciler.sh
|
||||
Source4: macros.%{name}
|
||||
Source5: http://repo1.maven.org/maven2/org/eclipse/osgi/org.eclipse.osgi/3.6.0.v20100517/org.eclipse.osgi-3.6.0.v20100517.pom
|
||||
# Fetched from http://repo1.maven.org/maven2/org/eclipse/osgi/org.eclipse.osgi.services/3.2.100.v20100503/org.eclipse.osgi.services-3.2.100.v20100503.pom
|
||||
|
@ -232,6 +232,9 @@ pushd $RPM_BUILD_ROOT%{_libdir}/%{name}/configuration/org.eclipse.osgi/
|
|||
rm -rf .bundledata* .lazy* .manager .state*
|
||||
popd
|
||||
|
||||
#install the reconciler script
|
||||
cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/
|
||||
|
||||
# Symlinks to the SWT JNI shared libraries in %%{_libdir}/eclipse
|
||||
pushd $RPM_BUILD_ROOT%{_libdir}/%{name}
|
||||
for lib in $(find configuration -name libswt\*.so); do
|
||||
|
@ -400,6 +403,7 @@ rm -rf %{_bindir}/efj/
|
|||
%{_datadir}/applications/*
|
||||
%{_datadir}/pixmaps/*
|
||||
%{_datadir}/icons/*/*/apps/*
|
||||
%{_bindir}/eclipse-reconciler.sh
|
||||
%{_libdir}/%{name}/eclipse
|
||||
%dir %{_libdir}/%{name}/dropins
|
||||
%dir %{_datadir}/%{name}/dropins
|
||||
|
@ -563,6 +567,9 @@ rm -rf %{_bindir}/efj/
|
|||
%{_libdir}/%{name}/dropins/sdk
|
||||
|
||||
%changelog
|
||||
* Thu Feb 16 2012 Sami Wagiaalla <swagiaal@redhat.com> 1:3.8.0-0.12.I201202070800
|
||||
- Install a blank eclipse-reconciler.sh.
|
||||
|
||||
* Thu Feb 16 2012 Krzysztof Daniel <kdaniel@redhat.com> 1:3.8.0-0.11.I201202070800
|
||||
- Using system jar for junit 4 and different OSGI metadata for junit 3
|
||||
- Adopt noarch icu4j-eclipse
|
||||
|
|
Loading…
Reference in New Issue