diff --git a/eclipse-fix-dropins.patch b/eclipse-fix-dropins.patch new file mode 100644 index 0000000..159445b --- /dev/null +++ b/eclipse-fix-dropins.patch @@ -0,0 +1,46 @@ +--- rt.equinox.p2/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java ++++ rt.equinox.p2/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java +@@ -7,6 +7,7 @@ + * Contributors: + * IBM Corporation - initial API and implementation + * Ericsson AB - ongoing development ++ * Red Hat, Inc. - Bug 408138 + ******************************************************************************/ + package org.eclipse.equinox.internal.p2.engine; + +@@ -38,6 +39,7 @@ import org.xml.sax.SAXException; + + public class SimpleProfileRegistry implements IProfileRegistry, IAgentService { + ++ private static final String PROP_IGNORE_USER_CONFIGURATION = "eclipse.ignoreUserConfiguration"; //$NON-NLS-1$ + private static final String SIMPLE_PROFILE_REGISTRY_INTERNAL = "_simpleProfileRegistry_internal_"; //$NON-NLS-1$ + private static final String PROFILE_REGISTRY = "profile registry"; //$NON-NLS-1$ + private static final String PROFILE_PROPERTIES_FILE = "state.properties"; //$NON-NLS-1$ +@@ -263,6 +265,14 @@ public class SimpleProfileRegistry implements IProfileRegistry, IAgentService { + internalSetProfileStateProperty(profile, profile.getTimestamp(), IProfile.STATE_PROP_SHARED_INSTALL, IProfile.STATE_SHARED_INSTALL_VALUE_NEW); + internalSetProfileStateProperty(profile, profile.getTimestamp(), SIMPLE_PROFILE_REGISTRY_INTERNAL + getBaseTimestamp(profile.getProfileId()), getBaseTimestamp(id)); + agent.registerService(SERVICE_SHARED_INSTALL_NEW_TIMESTAMP, Long.toString(profile.getTimestamp())); ++ ++ // this looks like a hack, but: ++ // (1) SimpleConfigurationImpl keeps returning master configuration as long as the property is set ++ // (2) SimpleConfigurationImpl sets the propery after it drops user configuration ++ // therefore dropins reconciliation can't load dropins plugins installed into user configuration ++ // after the user configuration has been dropped. ++ // It is necessary to unset this property. ++ System.setProperty(PROP_IGNORE_USER_CONFIGURATION, "processed_and_unset"); //$NON-NLS-1$ //$NON-NLS-2$ + } else { + //This is the first time we create the shared profile. Tag it as such and also remember the timestamp of the base + internalSetProfileStateProperty(profile, profile.getTimestamp(), IProfile.STATE_PROP_SHARED_INSTALL, IProfile.STATE_SHARED_INSTALL_VALUE_INITIAL); +@@ -279,6 +289,12 @@ public class SimpleProfileRegistry implements IProfileRegistry, IAgentService { + if (agent.getService(SERVICE_SHARED_INSTALL_NEW_TIMESTAMP) != null) + return false; + ++ // if the property is set by OSGI, and there is no new timestamp (because of the previous condition) ++ // ignore current profile. This will happen only once, because SERVICE_SHARED_INSTALL_NEW_TIMESTAMP ++ // is set during profile reset. ++ if ("true".equals(System.getProperty(PROP_IGNORE_USER_CONFIGURATION))) //$NON-NLS-1$ //$NON-NLS-2$ ++ return true; ++ + String baseTimestamp = getBaseTimestamp(profile.getProfileId()); + if (baseTimestamp == null) + return false; diff --git a/eclipse.spec b/eclipse.spec index 34ca5d7..f1f4b43 100644 --- a/eclipse.spec +++ b/eclipse.spec @@ -52,7 +52,7 @@ fi; Summary: An open, extensible IDE Name: %{?scl_prefix}eclipse Version: %{eclipse_version} -Release: 0.46.git4bccf2%{?dist} +Release: 0.48.git4bccf2%{?dist} License: EPL Group: Development/Tools URL: http://www.eclipse.org/ @@ -120,6 +120,8 @@ Patch23: %{pkg_name}-jetty-9.patch Patch25: %{pkg_name}-fix-startup-class-refresh.patch +Patch26: %{pkg_name}-fix-dropins.patch + BuildRequires: ant >= 1.8.3 BuildRequires: rsync BuildRequires: jpackage-utils >= 0:1.5, make, gcc @@ -339,6 +341,7 @@ tar --strip-components=1 -xf %{SOURCE1} %{!?scl:%patch23} #%patch24 %patch25 +%patch26 #Disable as many things as possible to make the build faster. We care only for Eclipse. %pom_disable_module platform.sdk eclipse.platform.releng.tychoeclipsebuilder @@ -992,6 +995,13 @@ fi %{_libdir}/%{pkg_name}/plugins/org.eclipse.osgi.util_* %changelog +* Thu May 16 2013 Krzysztof Daniel 1:4.3.0-0.48.git4bccf2 +- Incorporate patch for dropins issue (Bug 408138) +- Revert previous change. + +* Wed May 15 2013 Krzysztof Daniel 1:4.3.0-0.47.git4bccf2 +- Revert patches for startup issues as they cause more harm than good. + * Tue May 14 2013 Krzysztof Daniel 1:4.3.0-0.46.git4bccf2 - Rebuild to pick up icu4j 50.1.1.