Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSusan Franklin2010-03-09 01:41:20 +0000
committerSusan Franklin2010-03-09 01:41:20 +0000
commitb6f54c6de86ecb2811d2d105dfeb3d22fc298b5a (patch)
tree6dbe2cffc1d2184a800815536589486ea83c9c9d /bundles/org.eclipse.equinox.p2.director.app/src/org
parent15cae78a65c657234d79fa501494ae91c86c4544 (diff)
downloadrt.equinox.p2-b6f54c6de86ecb2811d2d105dfeb3d22fc298b5a.tar.gz
rt.equinox.p2-b6f54c6de86ecb2811d2d105dfeb3d22fc298b5a.tar.xz
rt.equinox.p2-b6f54c6de86ecb2811d2d105dfeb3d22fc298b5a.zip
Bug 229183 - [director] [api] ProvisioningContex does not handle repository in a consistent way
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.director.app/src/org')
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Application.java9
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java12
2 files changed, 14 insertions, 7 deletions
diff --git a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Application.java b/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Application.java
index 26d87faa1..0fa76f6dc 100644
--- a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Application.java
+++ b/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/Application.java
@@ -405,7 +405,8 @@ public class Application implements IApplication {
logFailure(multi);
return EXIT_ERROR;
}
- ProvisioningContext context = new ProvisioningContext(metadataRepositoryLocations);
+ ProvisioningContext context = new ProvisioningContext(agent);
+ context.setMetadataRepositories(metadataRepositoryLocations);
context.setArtifactRepositories(artifactRepositoryLocations);
ProfileChangeRequest request = buildProvisioningRequest(profile, roots, command == COMMAND_INSTALL);
printRequest(request);
@@ -534,7 +535,8 @@ public class Application implements IApplication {
// will set it back later (see bug 269468)
request.setProfileProperty(IProfile.PROP_ROAMING, "false"); //$NON-NLS-1$
- ProvisioningContext context = new ProvisioningContext(new URI[0]);
+ ProvisioningContext context = new ProvisioningContext(agent);
+ context.setMetadataRepositories(new URI[0]);
context.setArtifactRepositories(new URI[0]);
IProvisioningPlan result = planner.getProvisioningPlan(request, context, new NullProgressMonitor());
return PlanExecutionHelper.executePlan(result, engine, context, new NullProgressMonitor());
@@ -546,7 +548,8 @@ public class Application implements IApplication {
private IStatus setRoaming(IProfile profile) {
ProfileChangeRequest request = new ProfileChangeRequest(profile);
request.setProfileProperty(IProfile.PROP_ROAMING, "true"); //$NON-NLS-1$
- ProvisioningContext context = new ProvisioningContext(new URI[0]);
+ ProvisioningContext context = new ProvisioningContext(agent);
+ context.setMetadataRepositories(new URI[0]);
context.setArtifactRepositories(new URI[0]);
IProvisioningPlan result = planner.getProvisioningPlan(request, context, new NullProgressMonitor());
return PlanExecutionHelper.executePlan(result, engine, context, new NullProgressMonitor());
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 b9551dab9..047098eca 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
@@ -531,7 +531,8 @@ public class DirectorApplication implements IApplication {
boolean wasRoaming = Boolean.valueOf(profile.getProperty(IProfile.PROP_ROAMING)).booleanValue();
try {
updateRoamingProperties(profile);
- ProvisioningContext context = new ProvisioningContext(metadataRepositoryLocations.toArray(new URI[metadataRepositoryLocations.size()]));
+ ProvisioningContext context = new ProvisioningContext(agent);
+ context.setMetadataRepositories(metadataRepositoryLocations.toArray(new URI[metadataRepositoryLocations.size()]));
context.setArtifactRepositories(artifactRepositoryLocations.toArray(new URI[artifactRepositoryLocations.size()]));
ProfileChangeRequest request = buildProvisioningRequest(profile, installs, uninstalls);
printRequest(request);
@@ -806,7 +807,8 @@ public class DirectorApplication implements IApplication {
throw new CoreException(new Status(IStatus.ERROR, Activator.ID, Messages.Missing_profile));
IProvisioningPlan plan = planner.getDiffPlan(profile, targetProfile, new NullProgressMonitor());
- ProvisioningContext context = new ProvisioningContext(metadataRepositoryLocations.toArray(new URI[metadataRepositoryLocations.size()]));
+ ProvisioningContext context = new ProvisioningContext(agent);
+ context.setMetadataRepositories(metadataRepositoryLocations.toArray(new URI[metadataRepositoryLocations.size()]));
context.setArtifactRepositories(artifactRepositoryLocations.toArray(new URI[artifactRepositoryLocations.size()]));
executePlan(context, plan);
}
@@ -900,7 +902,8 @@ public class DirectorApplication implements IApplication {
private IStatus setRoaming(IProfile profile) {
ProfileChangeRequest request = new ProfileChangeRequest(profile);
request.setProfileProperty(IProfile.PROP_ROAMING, "true"); //$NON-NLS-1$
- ProvisioningContext context = new ProvisioningContext(new URI[0]);
+ ProvisioningContext context = new ProvisioningContext(agent);
+ context.setMetadataRepositories(new URI[0]);
context.setArtifactRepositories(new URI[0]);
IProvisioningPlan result = planner.getProvisioningPlan(request, context, new NullProgressMonitor());
return PlanExecutionHelper.executePlan(result, engine, context, new NullProgressMonitor());
@@ -951,7 +954,8 @@ public class DirectorApplication implements IApplication {
// will set it back later (see bug 269468)
request.setProfileProperty(IProfile.PROP_ROAMING, "false"); //$NON-NLS-1$
- ProvisioningContext context = new ProvisioningContext(new URI[0]);
+ ProvisioningContext context = new ProvisioningContext(agent);
+ context.setMetadataRepositories(new URI[0]);
context.setArtifactRepositories(new URI[0]);
IProvisioningPlan result = planner.getProvisioningPlan(request, context, new NullProgressMonitor());
IStatus status = PlanExecutionHelper.executePlan(result, engine, context, new NullProgressMonitor());

Back to the top