diff options
author | Christian Schneider | 2015-01-15 15:52:11 +0000 |
---|---|---|
committer | Pascal Rapicault | 2015-04-01 01:17:53 +0000 |
commit | 698ca12dbfbbaf618b102107ed6dd17038dcf88d (patch) | |
tree | e46527ff02faff57f00849c45567d04396f8519a | |
parent | f0966580855884e5394a8eefe84668adf30ca20a (diff) | |
download | rt.equinox.p2-698ca12dbfbbaf618b102107ed6dd17038dcf88d.tar.gz rt.equinox.p2-698ca12dbfbbaf618b102107ed6dd17038dcf88d.tar.xz rt.equinox.p2-698ca12dbfbbaf618b102107ed6dd17038dcf88d.zip |
bug 457619: MirrorRequest fails for remote after failing locally with
"is a folder but the repository is an archive or remote location"
MirrorRequest discards descriptor when changing sourceRepository
Change-Id: I513abf4adaab4b91a9b54ea473b0b67e29950b7a
Signed-off-by: Christian Schneider <schneider@yatta.de>
-rw-r--r-- | bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/MirrorRequest.java | 15 |
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); |