cvs: pear-core / package-PEAR.xml package2.xml /PEAR Downloader.php
| From: | Greg Beaver | Date: | Tue, 13 Feb 2007 04:23:17 +0000 |
| Subject: | cvs: pear-core / package-PEAR.xml package2.xml /PEAR Downloader.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-5415@lists.php.net to get a copy of this message | ||
cellog Tue Feb 13 04:23:17 2007 UTC
Modified files:
/pear-core package-PEAR.xml package2.xml
/pear-core/PEAR Downloader.php
Log:
* fix Bug #10081: installer dies on uninstall (recursion too deep)
add regression test for extremely complex dependency tree (tests both bug #9481 and Bug #10081)
http://cvs.php.net/viewvc.cgi/pear-core/package-PEAR.xml?r1=1.427&r2=1.428&diff_format=u
Index: pear-core/package-PEAR.xml
diff -u pear-core/package-PEAR.xml:1.427 pear-core/package-PEAR.xml:1.428
--- pear-core/package-PEAR.xml:1.427 Sun Feb 11 04:34:57 2007
+++ pear-core/package-PEAR.xml Tue Feb 13 04:23:17 2007
@@ -78,7 +78,7 @@
</maintainer>
</maintainers>
<release>
- <version>1.5.0</version>
+ <version>1.5.1</version>
<date>2007-02-23</date>
<license>PHP License</license>
<state>stable</state>
@@ -87,6 +87,7 @@
* fix Bug #9841: incorrect dependency information shown on uninstall
* fix Bug #9957: E_NOTICE on remote-list
* fix Bug #10012: pear package: tokenizer should be enabled
+ * fix Bug #10081: installer dies on uninstall (recursion too deep)
</notes>
<provides type="class" name="OS_Guess"/>
<provides type="class" name="System"/>
http://cvs.php.net/viewvc.cgi/pear-core/package2.xml?r1=1.321&r2=1.322&diff_format=u
Index: pear-core/package2.xml
diff -u pear-core/package2.xml:1.321 pear-core/package2.xml:1.322
--- pear-core/package2.xml:1.321 Sun Feb 11 04:34:57 2007
+++ pear-core/package2.xml Tue Feb 13 04:23:17 2007
@@ -89,9 +89,14 @@
<license uri="http://www.php.net/license">PHP
License</license>
<notes>
Major bugfix release
+ uninstall validation was completely rewritten, the previous algorithm
+ was incorrect in certain complex situations.
+ Fortunately, none exist in the real world yet. However, Structures_DataGrid
+ approaches this complexity, and so the error messages were incorrect.
* fix Bug #9841: incorrect dependency information shown on uninstall
* fix Bug #9957: E_NOTICE on remote-list
* fix Bug #10012: pear package: tokenizer should be enabled
+ * fix Bug #10081: installer dies on uninstall (recursion too deep)
</notes>
<contents>
<dir name="/">
http://cvs.php.net/viewvc.cgi/pear-core/PEAR/Downloader.php?r1=1.121&r2=1.122&diff_format=u
Index: pear-core/PEAR/Downloader.php
diff -u pear-core/PEAR/Downloader.php:1.121 pear-core/PEAR/Downloader.php:1.122
--- pear-core/PEAR/Downloader.php:1.121 Sun Jan 14 21:11:54 2007
+++ pear-core/PEAR/Downloader.php Tue Feb 13 04:23:17 2007
@@ -18,7 +18,7 @@
* @author Martin Jansen <mj@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: Downloader.php,v 1.121 2007/01/14 21:11:54 cellog Exp $
+ * @version CVS: $Id: Downloader.php,v 1.122 2007/02/13 04:23:17 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.3.0
*/
@@ -1319,6 +1319,8 @@
$keepgoing = false;
foreach ($deplinks as $dep => $parents) {
foreach ($parents as $parent => $unused) {
+ // reset the parent cycle detector
+ $this->_testCycle(null, null, null);
if ($this->_testCycle($dep, $deplinks, $parent)) {
$keepgoing = true;
unset($deplinks[$dep][$parent]);
@@ -1334,6 +1336,17 @@
function _testCycle($test, $deplinks, $dep)
{
+ static $visited = array();
+ if ($test === null) {
+ $visited = array();
+ return;
+ }
+ // this happens when a parent has a dep cycle on another dependency
+ // but the child is not part of the cycle
+ if (isset($visited[$dep])) {
+ return false;
+ }
+ $visited[$dep] = 1;
if ($test == $dep) {
return true;
}