summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/solver3.cc2
-rw-r--r--test/integration/solver3.broken1
-rwxr-xr-xtest/integration/test-resolver-provider-exchange1
3 files changed, 3 insertions, 1 deletions
diff --git a/apt-pkg/solver3.cc b/apt-pkg/solver3.cc
index 3c4ca4eb7..216651a97 100644
--- a/apt-pkg/solver3.cc
+++ b/apt-pkg/solver3.cc
@@ -189,6 +189,8 @@ bool APT::Solver::Work::operator<(APT::Solver::Work const &b) const
return std::any_of(solutions.begin(), solutions.end(), [b](auto sol) -> bool
{ return std::find(b.solutions.begin(), b.solutions.end(), sol) != b.solutions.end(); });
}
+ if (optional && b.optional && reason.empty() != b.reason.empty())
+ return reason.empty();
// An optional item is less important than a required one.
if (optional != b.optional)
return optional;
diff --git a/test/integration/solver3.broken b/test/integration/solver3.broken
index 9228e46c8..c098b7498 100644
--- a/test/integration/solver3.broken
+++ b/test/integration/solver3.broken
@@ -27,7 +27,6 @@ test-phased-updates-upgrade
test-prevent-markinstall-multiarch-same-versionscrew
test-release-candidate-switching
test-resolve-by-keep-new-recommends
-test-resolver-provider-exchange
test-ubuntu-bug-1130419-prefer-installed-ma-same-siblings
test-ubuntu-bug-1304403-obsolete-priority-standard
test-ubuntu-bug-1990586
diff --git a/test/integration/test-resolver-provider-exchange b/test/integration/test-resolver-provider-exchange
index 0a85db34d..45d936978 100755
--- a/test/integration/test-resolver-provider-exchange
+++ b/test/integration/test-resolver-provider-exchange
@@ -4,6 +4,7 @@ set -e
TESTDIR="$(readlink -f "$(dirname "$0")")"
. "$TESTDIR/framework"
setupenvironment
+allowremovemanual
configarchitecture 'amd64'
insertinstalledpackage 'fuse' 'all' '2'