1
0
Fork 0

An array of installed packages is no longer needed in the solver

pull/636/head
Nils Adermann 2012-04-27 18:24:17 +02:00
parent 7be4b82ad2
commit f98ab2e491
1 changed files with 1 additions and 6 deletions

View File

@ -35,8 +35,6 @@ class Solver
protected $decisionMap; protected $decisionMap;
protected $installedMap; protected $installedMap;
protected $installedPackages;
protected $packageToFeatureRule = array(); protected $packageToFeatureRule = array();
protected $decisionQueue = array(); protected $decisionQueue = array();
@ -495,9 +493,8 @@ class Solver
protected function setupInstalledMap() protected function setupInstalledMap()
{ {
$this->installedPackages = $this->installed->getPackages();
$this->installedMap = array(); $this->installedMap = array();
foreach ($this->installedPackages as $package) { foreach ($this->installed->getPackages() as $package) {
$this->installedMap[$package->getId()] = $package; $this->installedMap[$package->getId()] = $package;
} }
} }
@ -1269,9 +1266,7 @@ class Solver
// * here's the main loop: // * here's the main loop:
// * 1) propagate new decisions (only needed once) // * 1) propagate new decisions (only needed once)
// * 2) fulfill jobs // * 2) fulfill jobs
// * 3) try to keep installed packages
// * 4) fulfill all unresolved rules // * 4) fulfill all unresolved rules
// * 5) install recommended packages
// * 6) minimalize solution if we had choices // * 6) minimalize solution if we had choices
// * if we encounter a problem, we rewind to a safe level and restart // * if we encounter a problem, we rewind to a safe level and restart
// * with step 1 // * with step 1