Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorRequest.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorRequest.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorRequest.java
index a08b396cf..03ead3f79 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorRequest.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorRequest.java
@@ -10,6 +10,7 @@
* Compeople AG (Stefan Liebig) - various ongoing maintenance
* Genuitec LLC - various bug fixes
* Sonatype, Inc. - transport split
+ * Yatta Solutions GmbH - bug 457619
*******************************************************************************/
package org.eclipse.equinox.internal.p2.artifact.repository;
@@ -95,6 +96,20 @@ public class MirrorRequest extends ArtifactRequest {
this.downloadStatsParamters = statsParameters;
}
+ @Override
+ protected void setSourceRepository(IArtifactRepository value)
+ {
+ if (value != getSourceRepository())
+ {
+ // This refreshes the descriptor from the new repository as it might be different.
+ // If a MirrorRequest fails for a local repository the descriptor might indicate a "folder based" artifact
+ // which causes the MirrorRequest to fail again with a remote repository if the descriptor is not fetched again.
+ // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=457619
+ descriptor = null;
+ }
+ super.setSourceRepository(value);
+ }
+
public void perform(IArtifactRepository sourceRepository, IProgressMonitor monitor) {
monitor.subTask(NLS.bind(Messages.downloading, getArtifactKey().getId()));
setSourceRepository(sourceRepository);

Back to the top