Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 104029 Details for
Bug 233214
Failing to try mirrors when processing steps reports an error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Updated patch
patch.txt (text/plain), 2.82 KB, created by
John Arthorne
on 2008-06-06 14:50:25 EDT
(
hide
)
Description:
Updated patch
Filename:
MIME Type:
Creator:
John Arthorne
Created:
2008-06-06 14:50:25 EDT
Size:
2.82 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.equinox.p2.artifact.repository >Index: src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java,v >retrieving revision 1.58 >diff -u -r1.58 SimpleArtifactRepository.java >--- src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java 4 Jun 2008 18:53:13 -0000 1.58 >+++ src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java 6 Jun 2008 18:47:19 -0000 >@@ -418,6 +418,23 @@ > //download from the best available mirror > String baseLocation = getLocation(descriptor); > String mirrorLocation = getMirror(baseLocation); >+ IStatus status = downloadArtifact(descriptor, mirrorLocation, destination, monitor); >+ IStatus result = reportStatus(descriptor, destination, status); >+ // 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 (mirrors != null) { >+ mirrors.reportResult(mirrorLocation, result); >+ if (mirrors.hasValidMirror()) >+ return new MultiStatus(Activator.ID, CODE_RETRY, new IStatus[] {result}, "Retry another mirror", null); //$NON-NLS-1$ >+ } >+ } >+ // if the original status was a retry, don't lose that. >+ return status.getCode() == CODE_RETRY ? status : result; >+ } >+ >+ private IStatus downloadArtifact(IArtifactDescriptor descriptor, String mirrorLocation, OutputStream destination, IProgressMonitor monitor) { > IStatus result = getTransport().download(mirrorLocation, destination, monitor); > if (mirrors != null) > mirrors.reportResult(mirrorLocation, result); >@@ -468,14 +485,7 @@ > if (!status.isOK() && status.getSeverity() != IStatus.INFO) > return status; > >- status = downloadArtifact(descriptor, destination, monitor); >- IStatus result = reportStatus(descriptor, destination, status); >- // if the original status was RETRY then ensure that we return that status. It is >- // however important to call reportStatus() either way as it updates information >- // in addition to collecting status. >- // TODO we should remove this when there is more time for testing. >- return status.getCode() == CODE_RETRY ? status : result; >- >+ return downloadArtifact(descriptor, destination, monitor); > } > > public synchronized IArtifactDescriptor[] getArtifactDescriptors(IArtifactKey key) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 233214
:
103959
|
103989
|
103991
| 104029