1
0
Fork 0

Deciding to install a package and wanting to install it, is not a conflict

pull/321/head
Nils Adermann 2012-02-19 00:13:21 +01:00
parent fea16b39a1
commit 8fd4e56029
1 changed files with 7 additions and 2 deletions

View File

@ -1113,6 +1113,8 @@ class Solver
protected function addDecision(Literal $l, $level)
{
assert($this->decisionMap[$l->getPackageId()] == 0);
if ($l->isWanted()) {
$this->decisionMap[$l->getPackageId()] = $level;
} else {
@ -1123,6 +1125,9 @@ class Solver
protected function addDecisionId($literalId, $level)
{
$packageId = abs($literalId);
assert($this->decisionMap[$packageId] == 0);
if ($literalId > 0) {
$this->decisionMap[$packageId] = $level;
} else {
@ -1165,8 +1170,8 @@ class Solver
{
$packageId = abs($literalId);
return (
$this->decisionMap[$packageId] > 0 && !($literalId < 0) ||
$this->decisionMap[$packageId] < 0 && $literalId > 0
($this->decisionMap[$packageId] > 0 && $literalId < 0) ||
($this->decisionMap[$packageId] < 0 && $literalId > 0)
);
}