Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2010-05-20 10:53:54 -0400
committerAndrew Niefer2010-05-20 10:53:54 -0400
commitdde8100412fbafea862408ec38cfa98c3d42582a (patch)
tree3d5e79d5d7fa3576545199255f75f101d3e6a693
parent45e3b49f7541c8273e199038bcd6476bbd6c0adf (diff)
downloadrt.equinox.p2-dde8100412fbafea862408ec38cfa98c3d42582a.tar.gz
rt.equinox.p2-dde8100412fbafea862408ec38cfa98c3d42582a.tar.xz
rt.equinox.p2-dde8100412fbafea862408ec38cfa98c3d42582a.zip
bug 313615 - p2.mirror ignoreErrors does not workv20100520
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/MirrorApplication.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorTask.java4
2 files changed, 4 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/MirrorApplication.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/MirrorApplication.java
index 43b92e088..30fca24a1 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/MirrorApplication.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/MirrorApplication.java
@@ -182,7 +182,7 @@ public class MirrorApplication extends AbstractApplication implements IApplicati
IQueryable<IInstallableUnit> slice = slice(new NullProgressMonitor());
if (destinationArtifactRepository != null) {
mirrorStatus = mirrorArtifacts(slice, new NullProgressMonitor());
- if (mirrorStatus.getSeverity() == IStatus.ERROR)
+ if (failOnError && mirrorStatus.getSeverity() == IStatus.ERROR)
return mirrorStatus;
}
if (destinationMetadataRepository != null)
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorTask.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorTask.java
index b4cd7fe6a..8221b13c7 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorTask.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/MirrorTask.java
@@ -27,6 +27,7 @@ public class MirrorTask extends AbstractRepositoryTask {
private File mirrorLog; // file to log mirror output to (optional)
private ComparatorDescription comparator;
+ private boolean ignoreErrors = false;
public MirrorTask() {
application = new MirrorApplication();
@@ -59,7 +60,7 @@ public class MirrorTask extends AbstractRepositoryTask {
List<IInstallableUnit> ius = prepareIUs();
application.setSourceIUs(ius);
IStatus result = application.run(null);
- if (result.matches(IStatus.ERROR))
+ if (!ignoreErrors && result.matches(IStatus.ERROR))
throw new BuildException(TaskHelper.statusToString(result, IStatus.ERROR, null).toString());
} catch (ProvisionException e) {
throw new BuildException(e);
@@ -111,6 +112,7 @@ public class MirrorTask extends AbstractRepositoryTask {
* Set whether or not we should ignore errors when running the mirror application.
*/
public void setIgnoreErrors(boolean value) {
+ ignoreErrors = value;
((MirrorApplication) application).setIgnoreErrors(value);
}

Back to the top