|
|
11dc0f |
--- rt.equinox.p2/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java.orig 2014-03-24 10:49:00.000000000 +0000
|
|
|
11dc0f |
+++ rt.equinox.p2/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java 2014-03-24 15:39:32.122246214 +0000
|
|
|
11dc0f |
@@ -44,6 +44,7 @@
|
|
|
11dc0f |
|
|
|
11dc0f |
public class SimpleProfileRegistry implements IProfileRegistry, IAgentService {
|
|
|
11dc0f |
|
|
|
11dc0f |
+ private static final String PROP_IGNORE_USER_CONFIGURATION = "eclipse.ignoreUserConfiguration"; //$NON-NLS-1$
|
|
|
11dc0f |
private static final String SIMPLE_PROFILE_REGISTRY_INTERNAL = "_simpleProfileRegistry_internal_"; //$NON-NLS-1$
|
|
|
11dc0f |
private static final String PROFILE_REGISTRY = "profile registry"; //$NON-NLS-1$
|
|
|
11dc0f |
private static final String PROFILE_PROPERTIES_FILE = "state.properties"; //$NON-NLS-1$
|
|
|
11dc0f |
@@ -279,6 +280,14 @@
|
|
|
11dc0f |
//fragments support - remeber the property
|
|
|
11dc0f |
internalSetProfileStateProperty(profile, profile.getTimestamp(), SIMPLE_PROFILE_REGISTRY_INTERNAL + getExtTimeStamp(), getExtTimeStamp());
|
|
|
11dc0f |
agent.registerService(SERVICE_SHARED_INSTALL_NEW_TIMESTAMP, Long.toString(profile.getTimestamp()));
|
|
|
11dc0f |
+
|
|
|
11dc0f |
+ // this looks like a hack, but:
|
|
|
11dc0f |
+ // (1) SimpleConfigurationImpl keeps returning master configuration as long as the property is set
|
|
|
11dc0f |
+ // (2) SimpleConfigurationImpl sets the propery after it drops user configuration
|
|
|
11dc0f |
+ // therefore dropins reconciliation can't load dropins plugins installed into user configuration
|
|
|
11dc0f |
+ // after the user configuration has been dropped.
|
|
|
11dc0f |
+ // It is necessary to unset this property.
|
|
|
11dc0f |
+ //System.setProperty(PROP_IGNORE_USER_CONFIGURATION, "processed_and_unset"); //$NON-NLS-1$ //$NON-NLS-2$
|
|
|
11dc0f |
} else {
|
|
|
11dc0f |
//This is the first time we create the shared profile. Tag it as such and also remember the timestamp of the base
|
|
|
11dc0f |
internalSetProfileStateProperty(profile, profile.getTimestamp(), IProfile.STATE_PROP_SHARED_INSTALL, IProfile.STATE_SHARED_INSTALL_VALUE_INITIAL);
|
|
|
11dc0f |
@@ -312,6 +321,13 @@
|
|
|
11dc0f |
if (agent.getService(SERVICE_SHARED_INSTALL_NEW_TIMESTAMP) != null)
|
|
|
11dc0f |
return false;
|
|
|
11dc0f |
|
|
|
11dc0f |
+ // if the property is set by OSGI, and there is no new timestamp (because of the previous condition)
|
|
|
11dc0f |
+ // ignore current profile. This will happen only once, because SERVICE_SHARED_INSTALL_NEW_TIMESTAMP
|
|
|
11dc0f |
+ // is set during profile reset.
|
|
|
11dc0f |
+ if ("true".equals(System.getProperty(PROP_IGNORE_USER_CONFIGURATION))) { //$NON-NLS-1$ //$NON-NLS-2$
|
|
|
11dc0f |
+ System.setProperty(PROP_IGNORE_USER_CONFIGURATION, "processed_and_unset"); //$NON-NLS-1$ //$NON-NLS-2$
|
|
|
11dc0f |
+ return true;
|
|
|
11dc0f |
+ }
|
|
|
11dc0f |
String baseTimestamp = getBaseTimestamp(profile.getProfileId());
|
|
|
11dc0f |
String extTimestamp = getExtTimeStamp();
|
|
|
11dc0f |
if (baseTimestamp == null) {
|
|
|
11dc0f |
--- rt.equinox.p2/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java
|
|
|
11dc0f |
+++ rt.equinox.p2/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java
|
|
|
11dc0f |
@@ -563,6 +563,7 @@
|
|
|
11dc0f |
|
|
|
11dc0f |
// get all IUs from all our repos
|
|
|
11dc0f |
IQueryResult<IInstallableUnit> allIUs = getAllIUsFromRepos();
|
|
|
11dc0f |
+ HashSet<IInstallableUnit> removedFromAllIUs = new HashSet<IInstallableUnit>();
|
|
|
11dc0f |
for (Iterator<IInstallableUnit> iter = allIUs.iterator(); iter.hasNext();) {
|
|
|
11dc0f |
final IInstallableUnit iu = iter.next();
|
|
|
11dc0f |
IInstallableUnit existing = profileIUs.get(iu);
|
|
|
11dc0f |
@@ -576,6 +577,7 @@
|
|
|
11dc0f |
// (and more expensive) way to find this out is to do an IU profile property query.
|
|
|
11dc0f |
if (two == null) {
|
|
|
11dc0f |
// the IU is already installed so don't mark it as a dropin now - see bug 404619.
|
|
|
11dc0f |
+ removedFromAllIUs.add(iu);
|
|
|
11dc0f |
iter.remove();
|
|
|
11dc0f |
continue;
|
|
|
11dc0f |
}
|
|
|
11dc0f |
@@ -618,7 +620,7 @@
|
|
|
11dc0f |
}
|
|
|
11dc0f |
// if the IU from the profile is in the "all available" list, then it is already added
|
|
|
11dc0f |
// otherwise if it isn't in the repo then we have to remove it from the profile.
|
|
|
11dc0f |
- if (!all.contains(iu))
|
|
|
11dc0f |
+ if (!all.contains(iu) && !removedFromAllIUs.contains(iu))
|
|
|
11dc0f |
toRemove.add(iu);
|
|
|
11dc0f |
}
|
|
|
11dc0f |
|
|
|
11dc0f |
@@ -792,8 +794,8 @@
|
|
|
11dc0f |
IStatus installerPlanStatus = engine.perform(plan.getInstallerPlan(), phaseSet, monitor);
|
|
|
11dc0f |
if (!installerPlanStatus.isOK())
|
|
|
11dc0f |
return installerPlanStatus;
|
|
|
11dc0f |
-
|
|
|
11dc0f |
- applyConfiguration(true);
|
|
|
11dc0f |
+ if (isReconciliationApplicationRunning())
|
|
|
11dc0f |
+ applyConfiguration(true);
|
|
|
11dc0f |
}
|
|
|
11dc0f |
return engine.perform(plan, phaseSet, monitor);
|
|
|
11dc0f |
}
|
|
|
11dc0f |
--- rt.equinox.p2/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/MigrationWizard.java.orig 2018-04-25 20:31:57.931223008 +0100
|
|
|
11dc0f |
+++ rt.equinox.p2/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/MigrationWizard.java 2018-04-25 20:32:11.069144336 +0100
|
|
|
11dc0f |
@@ -151,7 +151,7 @@
|
|
|
11dc0f |
|
|
|
11dc0f |
@Override
|
|
|
11dc0f |
public boolean performCancel() {
|
|
|
11dc0f |
- String[] buttons = new String[] {IDialogConstants.YES_LABEL, ProvUIMessages.MigrationPage_LATER_BUTTON, IDialogConstants.NO_LABEL};
|
|
|
11dc0f |
+ String[] buttons = new String[] {IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL};
|
|
|
11dc0f |
MessageDialog dialog = new MessageDialog(getShell(), ProvUIMessages.MigrationPage_CONFIRMATION_TITLE, null, ProvUIMessages.MigrationPage_CONFIRMATION_DIALOG, MessageDialog.QUESTION, buttons, 2);
|
|
|
11dc0f |
|
|
|
11dc0f |
return rememberCancellationDecision(dialog.open());
|