|
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(ius[i], IInstallableUnit.PROP_PROFILE_LOCKED_IU); |
|
|
66 |
if (value != null) |
| 67 |
lockedForUpdate = (Integer.parseInt(value) & IInstallableUnit.LOCK_UPDATE) == IInstallableUnit.LOCK_UPDATE; |
| 68 |
if (lockedForUpdate) { |
| 69 |
// Add a status telling the user that this implies an update, but the |
| 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 |
} |
| 66 |
// Mark it as a root if it hasn't been already |
78 |
// Mark it as a root if it hasn't been already |
| 67 |
if (!Boolean.toString(true).equals(profile.getInstallableUnitProperty(installedIU, IInstallableUnit.PROP_PROFILE_ROOT_IU))) |
79 |
if (!Boolean.toString(true).equals(profile.getInstallableUnitProperty(installedIU, IInstallableUnit.PROP_PROFILE_ROOT_IU))) |
| 68 |
request.setInstallableUnitProfileProperty(ius[i], IInstallableUnit.PROP_PROFILE_ROOT_IU, Boolean.toString(true)); |
80 |
request.setInstallableUnitProfileProperty(ius[i], IInstallableUnit.PROP_PROFILE_ROOT_IU, Boolean.toString(true)); |
| 69 |
// Add a status informing the user that the update has been inferred |
|
|
| 70 |
status.merge(PlanAnalyzer.getStatus(IStatusCodes.ALTERED_IMPLIED_UPDATE, ius[i])); |
| 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])); |