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

main
Nils Adermann 12 years ago
parent cf5d14e2e1
commit 0bd6fa1f37

@ -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

Loading…
Cancel
Save