Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Bull2010-05-12 22:45:54 +0000
committerIan Bull2010-05-12 22:45:54 +0000
commitbe3442d57d477f2695f8a87ee2e48181abbbc013 (patch)
tree1178d9cd9716e095ab578fd72bedc219a9933907
parent8b581b9ee03861b6bddbbd78f5c0c80f8f531974 (diff)
downloadrt.equinox.p2-be3442d57d477f2695f8a87ee2e48181abbbc013.tar.gz
rt.equinox.p2-be3442d57d477f2695f8a87ee2e48181abbbc013.tar.xz
rt.equinox.p2-be3442d57d477f2695f8a87ee2e48181abbbc013.zip
bug 312687: Repo2Runnable should not consult all known repositories
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java
index 04f5e7fd3..57818e5ce 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java
@@ -11,6 +11,7 @@
*******************************************************************************/
package org.eclipse.equinox.p2.internal.repository.tools;
+import java.net.URI;
import java.net.URISyntaxException;
import java.util.*;
import org.eclipse.core.runtime.*;
@@ -125,6 +126,8 @@ public class Repo2Runnable extends AbstractApplication implements IApplication {
if (engine == null)
throw new ProvisionException(Messages.exception_noEngineService);
ProvisioningContext context = new ProvisioningContext(agent);
+ context.setMetadataRepositories(getRepositories(true));
+ context.setArtifactRepositories(getRepositories(false));
IProvisioningPlan plan = engine.createPlan(profile, context);
for (Iterator<IInstallableUnit> iterator = processedIUs.iterator(); iterator.hasNext();) {
plan.addInstallableUnit(iterator.next());
@@ -146,6 +149,15 @@ public class Repo2Runnable extends AbstractApplication implements IApplication {
}
}
+ protected URI[] getRepositories(boolean metadata) {
+ List<URI> repos = new ArrayList<URI>();
+ for (RepositoryDescriptor repo : sourceRepositories) {
+ if (metadata ? repo.isMetadata() : repo.isArtifact())
+ repos.add(repo.getRepoLocation());
+ }
+ return repos.toArray(new URI[repos.size()]);
+ }
+
protected PhaseSet getPhaseSet() {
return new PhaseSet(new Phase[] {new Collect(100)}) { /* nothing to override */};
}

Back to the top