Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2010-02-16 11:04:53 -0500
committerPascal Rapicault2010-02-16 11:04:53 -0500
commit328dbd720b902ff3e79c42a54d1bf51c4c22166a (patch)
treee0d1335b71b7245312c442694a43a61fc929ac9c /bundles/org.eclipse.equinox.p2.console
parentb13237bcb1a935120832e7d643f2f23b77b6f553 (diff)
downloadrt.equinox.p2-328dbd720b902ff3e79c42a54d1bf51c4c22166a.tar.gz
rt.equinox.p2-328dbd720b902ff3e79c42a54d1bf51c4c22166a.tar.xz
rt.equinox.p2-328dbd720b902ff3e79c42a54d1bf51c4c22166a.zip
Bug 302676 - provinstall does not always provide details for installation failures + proposed patch
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.console')
-rw-r--r--bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvCommandProvider.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvCommandProvider.java b/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvCommandProvider.java
index d9e59d664..912d92a15 100644
--- a/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvCommandProvider.java
+++ b/bundles/org.eclipse.equinox.p2.console/src/org/eclipse/equinox/internal/p2/console/ProvCommandProvider.java
@@ -171,8 +171,18 @@ public class ProvCommandProvider implements CommandProvider {
interpreter.println("Installation complete for " + iu + " " + version);
else {
interpreter.println("Installation failed for " + iu + " " + version);
- printErrorStatus(interpreter, s);
+ interpreter.println(flattenStatus(s.getChildren(), " "));
+ }
+ }
+
+ private String flattenStatus(IStatus[] childs, String indent) {
+ StringBuffer sb = new StringBuffer();
+
+ for (int i = 0; (childs != null) && (i < childs.length); i++) {
+ sb.append(indent).append(childs[i].getMessage()).append(NEW_LINE);
+ sb.append(flattenStatus(childs[i].getChildren(), indent + " "));
}
+ return sb.toString();
}
/**

Back to the top