} else if (rval instanceof IUpdateDescriptor) { if (lval instanceof IInstallableUnit) return Boolean.valueOf(((IUpdateDescriptor) rval).isUpdateOf((IInstallableUnit) lval)); } else if (rval instanceof LDAPApproximation) { if (lval instanceof CharSequence)
/** * Compute information about this IU. This computes whether or * not this IU is installed and / or updated. */ private InformationCache computeIUInformation(IInstallableUnit iu) { boolean isUpdate = false; boolean isInstalled = false; boolean isPatch = iu == null ? false : QueryUtil.isPatch(iu); if (profile != null && iu != null) { isInstalled = !profile.query(QueryUtil.createIUQuery(iu), null).isEmpty(); Iterator<IInstallableUnit> iter = profile.query(new UserVisibleRootQuery(), null).iterator(); while (iter.hasNext()) { IInstallableUnit installed = iter.next(); if (iu.getUpdateDescriptor() != null && iu.getUpdateDescriptor().isUpdateOf(installed) && (!iu.getId().equals(installed.getId()) || installed.getVersion().compareTo(iu.getVersion()) < 0)) { isUpdate = true; break; } } } return new InformationCache(iu, isUpdate, isInstalled, isPatch); }
while (allIUsIterator.hasNext()) { IInstallableUnit iuAlreadyInstalled = allIUsIterator.next(); if (entryToInstall.getUpdateDescriptor() != null && entryToInstall.getUpdateDescriptor().isUpdateOf(iuAlreadyInstalled)) { dealWithUpdates(status, profile, entryToInstall, iuAlreadyInstalled); handled = true;
while (allIUsIterator.hasNext()) { IInstallableUnit iuAlreadyInstalled = allIUsIterator.next(); if (entryToInstall.getUpdateDescriptor() != null && entryToInstall.getUpdateDescriptor().isUpdateOf(iuAlreadyInstalled)) { dealWithUpdates(status, profile, entryToInstall, iuAlreadyInstalled); handled = true;