Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 231200 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/equinox/internal/provisional/p2/ui/actions/InstallAction.java (-7 / +17 lines)
Lines 61-73 Link Here
61
				// If the iu is a newer version of something already installed, consider this an
61
				// If the iu is a newer version of something already installed, consider this an
62
				// update request
62
				// update request
63
				if (compareTo > 0) {
63
				if (compareTo > 0) {
64
					request.addInstallableUnits(new IInstallableUnit[] {ius[i]});
64
					boolean lockedForUpdate = false;
65
					request.removeInstallableUnits(new IInstallableUnit[] {installedIU});
65
					String value = profile.getInstallableUnitProperty(installedIU, IInstallableUnit.PROP_PROFILE_LOCKED_IU);
66
					// Mark it as a root if it hasn't been already
66
					if (value != null)
67
					if (!Boolean.toString(true).equals(profile.getInstallableUnitProperty(installedIU, IInstallableUnit.PROP_PROFILE_ROOT_IU)))
67
						lockedForUpdate = (Integer.parseInt(value) & IInstallableUnit.LOCK_UPDATE) == IInstallableUnit.LOCK_UPDATE;
68
						request.setInstallableUnitProfileProperty(ius[i], IInstallableUnit.PROP_PROFILE_ROOT_IU, Boolean.toString(true));
68
					if (lockedForUpdate) {
69
					// Add a status informing the user that the update has been inferred
69
						// Add a status telling the user that this implies an update, but the
70
					status.merge(PlanAnalyzer.getStatus(IStatusCodes.ALTERED_IMPLIED_UPDATE, ius[i]));
70
						// iu should not be updated
71
						status.merge(PlanAnalyzer.getStatus(IStatusCodes.ALTERED_IGNORED_IMPLIED_UPDATE, ius[i]));
72
					} else {
73
						request.addInstallableUnits(new IInstallableUnit[] {ius[i]});
74
						request.removeInstallableUnits(new IInstallableUnit[] {installedIU});
75
						// Add a status informing the user that the update has been inferred
76
						status.merge(PlanAnalyzer.getStatus(IStatusCodes.ALTERED_IMPLIED_UPDATE, ius[i]));
77
						// Mark it as a root if it hasn't been already
78
						if (!Boolean.toString(true).equals(profile.getInstallableUnitProperty(installedIU, IInstallableUnit.PROP_PROFILE_ROOT_IU)))
79
							request.setInstallableUnitProfileProperty(ius[i], IInstallableUnit.PROP_PROFILE_ROOT_IU, Boolean.toString(true));
80
					}
71
				} else if (compareTo < 0) {
81
				} else if (compareTo < 0) {
72
					// An implied downgrade.  We will not put this in the plan, add a status informing the user
82
					// An implied downgrade.  We will not put this in the plan, add a status informing the user
73
					status.merge(PlanAnalyzer.getStatus(IStatusCodes.ALTERED_IGNORED_IMPLIED_DOWNGRADE, ius[i]));
83
					status.merge(PlanAnalyzer.getStatus(IStatusCodes.ALTERED_IGNORED_IMPLIED_DOWNGRADE, ius[i]));
(-)src/org/eclipse/equinox/internal/p2/ui/messages.properties (+1 lines)
Lines 159-164 Link Here
159
159
160
PlanAnalyzer_IgnoringInstall="{0}" is not applicable to the current configuration and will not be installed.
160
PlanAnalyzer_IgnoringInstall="{0}" is not applicable to the current configuration and will not be installed.
161
PlanAnalyzer_IgnoringUninstall="{0}" cannot be uninstalled because other installed software depends on it.
161
PlanAnalyzer_IgnoringUninstall="{0}" cannot be uninstalled because other installed software depends on it.
162
PlanAnalyzer_LockedImpliedUpdate0={0} will be ignored because it is already installed, and updates are not permitted.
162
PlanAnalyzer_PartialInstall="{0}" is partially installed because other installed software requires it.  The remainder will be installed.
163
PlanAnalyzer_PartialInstall="{0}" is partially installed because other installed software requires it.  The remainder will be installed.
163
PlanAnalyzer_PartialUninstall= "{0}" cannot be fully uninstalled because other installed software requires it.  The parts that are not required will be uninstalled.
164
PlanAnalyzer_PartialUninstall= "{0}" cannot be fully uninstalled because other installed software requires it.  The parts that are not required will be uninstalled.
164
PlanAnalyzer_SideEffectInstall="{0}" will also be installed in order to complete this operation.
165
PlanAnalyzer_SideEffectInstall="{0}" will also be installed in order to complete this operation.
(-)src/org/eclipse/equinox/internal/p2/ui/PlanAnalyzer.java (+2 lines)
Lines 38-43 Link Here
38
				return new MultiStatus(ProvUIActivator.PLUGIN_ID, statusCode, ProvUIMessages.PlanStatusHelper_RequestAltered, null);
38
				return new MultiStatus(ProvUIActivator.PLUGIN_ID, statusCode, ProvUIMessages.PlanStatusHelper_RequestAltered, null);
39
			case IStatusCodes.ALTERED_IMPLIED_UPDATE :
39
			case IStatusCodes.ALTERED_IMPLIED_UPDATE :
40
				return new Status(IStatus.INFO, ProvUIActivator.PLUGIN_ID, statusCode, NLS.bind(ProvUIMessages.PlanStatusHelper_ImpliedUpdate, getIUString(affectedIU)), null);
40
				return new Status(IStatus.INFO, ProvUIActivator.PLUGIN_ID, statusCode, NLS.bind(ProvUIMessages.PlanStatusHelper_ImpliedUpdate, getIUString(affectedIU)), null);
41
			case IStatusCodes.ALTERED_IGNORED_IMPLIED_UPDATE :
42
				return new Status(IStatus.WARNING, ProvUIActivator.PLUGIN_ID, statusCode, NLS.bind(ProvUIMessages.PlanAnalyzer_LockedImpliedUpdate0, getIUString(affectedIU)), null);
41
			case IStatusCodes.ALTERED_IGNORED_IMPLIED_DOWNGRADE :
43
			case IStatusCodes.ALTERED_IGNORED_IMPLIED_DOWNGRADE :
42
				return new Status(IStatus.WARNING, ProvUIActivator.PLUGIN_ID, statusCode, NLS.bind(ProvUIMessages.PlanStatusHelper_IgnoringImpliedDowngrade, getIUString(affectedIU)), null);
44
				return new Status(IStatus.WARNING, ProvUIActivator.PLUGIN_ID, statusCode, NLS.bind(ProvUIMessages.PlanStatusHelper_IgnoringImpliedDowngrade, getIUString(affectedIU)), null);
43
			case IStatusCodes.ALTERED_IGNORED_ALREADY_INSTALLED :
45
			case IStatusCodes.ALTERED_IGNORED_ALREADY_INSTALLED :
(-)src/org/eclipse/equinox/internal/p2/ui/ProvUIMessages.java (+1 lines)
Lines 187-192 Link Here
187
	public static String UpdateAction_UpdatesAvailableTitle;
187
	public static String UpdateAction_UpdatesAvailableTitle;
188
	public static String PlanAnalyzer_IgnoringInstall;
188
	public static String PlanAnalyzer_IgnoringInstall;
189
	public static String PlanAnalyzer_IgnoringUninstall;
189
	public static String PlanAnalyzer_IgnoringUninstall;
190
	public static String PlanAnalyzer_LockedImpliedUpdate0;
190
	public static String PlanAnalyzer_PartialInstall;
191
	public static String PlanAnalyzer_PartialInstall;
191
	public static String PlanAnalyzer_PartialUninstall;
192
	public static String PlanAnalyzer_PartialUninstall;
192
	public static String PlanAnalyzer_SideEffectInstall;
193
	public static String PlanAnalyzer_SideEffectInstall;
(-)src/org/eclipse/equinox/internal/provisional/p2/ui/IStatusCodes.java (+1 lines)
Lines 38-43 Link Here
38
	public static final int ALTERED_SIDE_EFFECT_INSTALL = 10010;
38
	public static final int ALTERED_SIDE_EFFECT_INSTALL = 10010;
39
	public static final int ALTERED_IGNORED_INSTALL_REQUEST = 10011;
39
	public static final int ALTERED_IGNORED_INSTALL_REQUEST = 10011;
40
	public static final int ALTERED_IGNORED_UNINSTALL_REQUEST = 10012;
40
	public static final int ALTERED_IGNORED_UNINSTALL_REQUEST = 10012;
41
	public static final int ALTERED_IGNORED_IMPLIED_UPDATE = 10013;
41
42
42
	// Status codes associated with inability to perform an operation
43
	// Status codes associated with inability to perform an operation
43
	public static final int UNEXPECTED_NOTHING_TO_DO = 10050;
44
	public static final int UNEXPECTED_NOTHING_TO_DO = 10050;

Return to bug 231200