Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java')
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java19
1 files changed, 18 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
index 4c0777d14..1f036394b 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
@@ -592,7 +592,7 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
// if the original download went reasonably but the reportStatus found some issues
// (e..g, in the processing steps/validators) then mark the mirror as bad and return
// a retry code (assuming we have more mirrors)
- if ((status.isOK() || status.matches(IStatus.INFO | IStatus.WARNING)) && result.getSeverity() == IStatus.ERROR) {
+ if ((status.isOK() || status.matches(IStatus.INFO | IStatus.WARNING)) && result.getSeverity() == IStatus.ERROR && !artifactError(result)) {
if (mirrors != null) {
mirrors.reportResult(mirrorLocation.toString(), result);
if (mirrors.hasValidMirror())
@@ -604,6 +604,23 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
}
/**
+ * Return true if there is an 'artifact error'. You cannot retry when an artifact error is found.
+ * @return True if the status (or children status) have an artifact error status code. False otherwise
+ */
+ private boolean artifactError(IStatus status) {
+ if (status.getCode() == MirrorRequest.ARTIFACT_PROCESSING_ERROR)
+ return true;
+ if (status.getChildren() != null) {
+ IStatus[] children = status.getChildren();
+ for (IStatus child : children) {
+ if (artifactError(child))
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
* Copy a file to an output stream.
* Optionally close the streams when done.
* Notify the monitor about progress we make

Back to the top