diff options
author | John Arthorne | 2008-01-04 19:39:48 +0000 |
---|---|---|
committer | John Arthorne | 2008-01-04 19:39:48 +0000 |
commit | d8a4990a49ef57449a1e7db66a7bc3cd339e0416 (patch) | |
tree | baba695cbfa7f54d63ee0aa37e2971bdca910c59 /bundles/org.eclipse.equinox.p2.artifact.processors | |
parent | d1fd658e1de855f36d003e1b557ee11a80b8c7f2 (diff) | |
download | rt.equinox.p2-d8a4990a49ef57449a1e7db66a7bc3cd339e0416.tar.gz rt.equinox.p2-d8a4990a49ef57449a1e7db66a7bc3cd339e0416.tar.xz rt.equinox.p2-d8a4990a49ef57449a1e7db66a7bc3cd339e0416.zip |
Bug 207978 - support for lazy loading and flushing artifact repositories
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.artifact.processors')
-rw-r--r-- | bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/AbstractDeltaProcessorStep.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/AbstractDeltaProcessorStep.java b/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/AbstractDeltaProcessorStep.java index 8f0087692..7963cb4ec 100644 --- a/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/AbstractDeltaProcessorStep.java +++ b/bundles/org.eclipse.equinox.p2.artifact.processors/src/org/eclipse/equinox/internal/p2/artifact/processors/AbstractDeltaProcessorStep.java @@ -11,6 +11,7 @@ *******************************************************************************/ package org.eclipse.equinox.internal.p2.artifact.processors; +import java.net.URL; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.equinox.internal.p2.artifact.optimizers.AbstractDeltaStep; @@ -45,11 +46,14 @@ public abstract class AbstractDeltaProcessorStep extends AbstractDeltaStep { return; } - IArtifactRepository[] repositories = repoMgr.getKnownRepositories(); + URL[] repositories = repoMgr.getKnownRepositories(); for (int i = 0; i < repositories.length; i++) { - if ("file".equals(repositories[i].getLocation().getProtocol()) && repositories[i].contains(key)) { - repository = repositories[i]; - return; + if ("file".equals(repositories[i].getProtocol())) {//$NON-NLS-1$ + IArtifactRepository currentRepo = repoMgr.loadRepository(repositories[i], null); + if (currentRepo != null && currentRepo.contains(key)) { + repository = currentRepo; + return; + } } } status = new Status(IStatus.ERROR, Activator.ID, "No repository available containing key " + key); |