1
0
Fork 0

Generate transaction from solver's final decision queue.

pull/1/head
Nils Adermann 2011-05-20 20:50:09 +02:00
parent ea71abb3fd
commit f3d9c8701a
1 changed files with 17 additions and 1 deletions

View File

@ -574,8 +574,24 @@ class Solver
//findrecommendedsuggested(solv);
//solver_prepare_solutions(solv);
//transaction_calculate(&solv->trans, &solv->decisionq, &solv->noobsoletes);
$transaction = array();
foreach ($this->decisionQueue as $literal) {
$package = $literal->getPackage();
// wanted & installed || !wanted & !installed
if ($literal->isWanted() == ($this->installed == $package->getRepository())) {
continue;
}
$transaction[] = array(
'job' => ($literal->isWanted()) ? 'install' : 'remove',
'package' => $package,
);
}
return $transaction;
}
public function printRules()