diff options
author | DJ Houghton | 2011-04-12 17:06:08 +0000 |
---|---|---|
committer | DJ Houghton | 2011-04-12 17:06:08 +0000 |
commit | b4a3f9be36487928c8eb6caed47d7583f062e960 (patch) | |
tree | 87abd78107996ee4c414af62200841617f833ee5 | |
parent | 19ec016b99297a1f98f94b0136189cb34f96e2bc (diff) | |
download | rt.equinox.p2-b4a3f9be36487928c8eb6caed47d7583f062e960.tar.gz rt.equinox.p2-b4a3f9be36487928c8eb6caed47d7583f062e960.tar.xz rt.equinox.p2-b4a3f9be36487928c8eb6caed47d7583f062e960.zip |
Bug 342492 - [director] Unable to set IU profile property on latest IU version in repo with multiple versions
-rw-r--r-- | bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java b/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java index d7886abdf..f3181f7b7 100644 --- a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java +++ b/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java @@ -360,8 +360,13 @@ public class DirectorApplication implements IApplication { logStatus(new Status(IStatus.WARNING, Activator.ID, message)); continue; } - // lookup the IU - IQueryResult<IInstallableUnit> qr = getInstallableUnits(null, QueryUtil.createIUQuery(id, version), null); + + // lookup the IU - a null version matches all versions + IQuery<IInstallableUnit> query = QueryUtil.createIUQuery(id, version); + // if we don't have a version the choose the latest. + if (version == null) + query = QueryUtil.createLatestQuery(query); + IQueryResult<IInstallableUnit> qr = getInstallableUnits(null, query, null); if (qr.isEmpty()) { String msg = NLS.bind(Messages.Cannot_set_iu_profile_property_iu_does_not_exist, id + '/' + version); logStatus(new Status(IStatus.WARNING, Activator.ID, msg)); |