diff options
author | Christian Walther | 2021-06-14 12:56:47 +0000 |
---|---|---|
committer | Andrey Loskutov | 2021-06-15 15:31:06 +0000 |
commit | dcd4789b8f2528b605fe913cf43161b052e4874c (patch) | |
tree | 452adb8d775553f0ce2a39349dbb90c64d3f2995 | |
parent | a5f93932388fccec6b4f1dd1f48ab0ec44f5d6ac (diff) | |
download | rt.equinox.p2-dcd4789b8f2528b605fe913cf43161b052e4874c.tar.gz rt.equinox.p2-dcd4789b8f2528b605fe913cf43161b052e4874c.tar.xz rt.equinox.p2-dcd4789b8f2528b605fe913cf43161b052e4874c.zip |
Bug 574186 - Better error message for negative dependencyI20210617-1800I20210616-1800I20210615-1800
When an unsatisfied dependency has max='0', i.e. expresses that A
depends on B *not* being there, make that clear in the error message by
saying "A conflicts with B" instead of "A depends on B".
Change-Id: Id06e2d8130be2016bcd4432c541a6d178bb5c2b8
Signed-off-by: Christian Walther <walther@indel.ch>
Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.p2/+/181923
Tested-by: Equinox Bot <equinox-bot@eclipse.org>
Reviewed-by: Andrey Loskutov <loskutov@gmx.de>
3 files changed, 4 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Explanation.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Explanation.java index c24960dc6..780dd229e 100644 --- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Explanation.java +++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Explanation.java @@ -89,7 +89,8 @@ public abstract class Explanation implements Comparable<Explanation> { @Override public String toString() { - return NLS.bind(Messages.Explanation_hardDependency, iu, req); + return NLS.bind(req.getMax() == 0 ? Messages.Explanation_hardDependencyNegative + : Messages.Explanation_hardDependency, iu, req); } @Override diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Messages.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Messages.java index 87e08a7ec..7a5b2c3d3 100644 --- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Messages.java +++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Messages.java @@ -43,6 +43,7 @@ public class Messages extends NLS { public static String Explanation_from; public static String Explanation_fromPatch; public static String Explanation_hardDependency; + public static String Explanation_hardDependencyNegative; public static String Explanation_patchedHardDependency; public static String Explanation_missingRequired; public static String Explanation_missingRootRequired; diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/messages.properties b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/messages.properties index 1aba20a2e..17fb47c7a 100644 --- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/messages.properties +++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/messages.properties @@ -28,6 +28,7 @@ Explanation_alreadyInstalled=Software currently installed: {0} Explanation_from=From: {0} Explanation_fromPatch=From Patch: {0} Explanation_hardDependency=Cannot satisfy dependency: {0} depends on: {1} +Explanation_hardDependencyNegative=Cannot satisfy dependency: {0} conflicts with: {1} Explanation_patchedHardDependency=Cannot satisfy patched ({0}) dependency: {1} depends on: {2} Explanation_missingRequired=Missing requirement: {0} requires ''{1}'' but it could not be found Explanation_missingRootRequired=You requested to install ''{0}'' but it could not be found |