cvs: pear-core /PEAR Dependency2.php
| From: | Greg Beaver | Date: | Tue, 13 Feb 2007 04:16:26 +0000 |
| Subject: | cvs: pear-core /PEAR Dependency2.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-44645@lists.php.net to get a copy of this message | ||
cellog Tue Feb 13 04:16:26 2007 UTC
Modified files:
/pear-core/PEAR Dependency2.php
Log:
use getPackage() to retrieve
PEAR_PackageFile_v1/v2 object and then pf->getPackage(),
this works more reliably than
packageInfo() for retrieving package name in uninstall
validation routine
http://cvs.php.net/viewvc.cgi/pear-core/PEAR/Dependency2.php?r1=1.53&r2=1.54&diff_format=u
Index: pear-core/PEAR/Dependency2.php
diff -u pear-core/PEAR/Dependency2.php:1.53 pear-core/PEAR/Dependency2.php:1.54
--- pear-core/PEAR/Dependency2.php:1.53 Sun Feb 11 04:34:57 2007
+++ pear-core/PEAR/Dependency2.php Tue Feb 13 04:16:25 2007
@@ -15,7 +15,7 @@
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: Dependency2.php,v 1.53 2007/02/11 04:34:57 cellog Exp $
+ * @version CVS: $Id: Dependency2.php,v 1.54 2007/02/13 04:16:25 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 1.4.0a1
*/
@@ -986,13 +986,14 @@
}
$packagename = $this->_registry->parsePackageName($parent[0]);
$packagename['channel'] =
$this->_registry->channelAlias($packagename['channel']);
- $packagename['package'] =
$this->_registry->packageInfo($packagename['package'], 'package',
$packagename['channel']);
+ $pa = $this->_registry->getPackage($packagename['package'],
$packagename['channel']);
+ $packagename['package'] = $pa->getPackage();
$this->_currentPackage = $packagename;
// parent is not present in uninstall list, make sure we can actually
// uninstall it (parent dep is optional)
$parentname['channel'] =
$this->_registry->channelAlias($parent[1]['dep']['channel']);
- $parentname['package'] =
$this->_registry->packageInfo($parent[1]['dep']['name'],
- 'package', $parent[1]['dep']['channel']);
+ $pa =
$this->_registry->getPackage($parent[1]['dep']['name'],
$parent[1]['dep']['channel']);
+ $parentname['package'] = $pa->getPackage();
$parent[1]['dep']['package'] =
$parentname['package'];
$parent[1]['dep']['channel'] =
$parentname['channel'];
if ($parent[1]['type'] == 'optional') {