From: Gunnar Wrobel Date: Fri, 22 Oct 2010 22:02:33 +0000 (+0200) Subject: Introduce artificial optional dependency recursion for the installation test and... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=8bf7e2114523b14b42470a8cc318075f31e10c84;p=horde.git Introduce artificial optional dependency recursion for the installation test and readd the recursion safety we had in the old installer version. --- diff --git a/components/lib/Components/Helper/Tree/Element.php b/components/lib/Components/Helper/Tree/Element.php index 5594f75fb..4013ad9ca 100644 --- a/components/lib/Components/Helper/Tree/Element.php +++ b/components/lib/Components/Helper/Tree/Element.php @@ -80,12 +80,17 @@ class Components_Helper_Tree_Element /** * Install the tree of packages into the environment. * - * @param Components_Helper_InstallationRun $run The current installation run. + * @param Components_Helper_InstallationRun $run The current installation run. + * @param array $visited The packages already visited. * * @return NULL */ - public function installInTree(Components_Helper_InstallationRun $run) + public function installInTree(Components_Helper_InstallationRun $run, array $visited = array()) { + if (in_array($this->_package_file, $visited)) { + return; + } + $visited[] = $this->_package_file; $run->installChannelsOnce($this->_package->listAllRequiredChannels()); foreach ($this->_package->listAllExternalDependencies() as $dependency) { $run->installExternalPackageOnce( @@ -97,7 +102,7 @@ class Components_Helper_Tree_Element $this->_package->listAllHordeDependencies() ) as $child ) { - $child->installInTree($run); + $child->installInTree($run, $visited); } $run->installHordePackageOnce($this->_package_file); } diff --git a/components/test/Components/fixture/framework/Dependency/package.xml b/components/test/Components/fixture/framework/Dependency/package.xml index 59c2f7712..0cf1e60b8 100644 --- a/components/test/Components/fixture/framework/Dependency/package.xml +++ b/components/test/Components/fixture/framework/Dependency/package.xml @@ -44,6 +44,12 @@ pear.php.net + + + Install + pear.horde.org + +