mirror of
https://github.com/php/php-src.git
synced 2025-08-18 06:58:55 +02:00
Make the dependencies check look for the correct registry file
This commit is contained in:
parent
eb85e073e5
commit
4c125afc74
2 changed files with 6 additions and 6 deletions
|
@ -29,7 +29,10 @@ require_once "PEAR.php";
|
|||
|
||||
class PEAR_Dependency
|
||||
{
|
||||
|
||||
function PEAR_Dependency(&$registry)
|
||||
{
|
||||
$this->registry = &$registry;
|
||||
}
|
||||
/**
|
||||
* This method maps the xml dependency definition to the
|
||||
* PEAR_dependecy one
|
||||
|
@ -87,9 +90,6 @@ class PEAR_Dependency
|
|||
*/
|
||||
function checkPackage($name, $req = null, $relation = 'has')
|
||||
{
|
||||
if (empty($this->registry)) {
|
||||
$this->registry = new PEAR_Registry;
|
||||
}
|
||||
if (!$this->registry->packageExists($name)) {
|
||||
return "'$name' PEAR package is not installed";
|
||||
}
|
||||
|
|
|
@ -238,7 +238,7 @@ class PEAR_Installer extends PEAR_Common
|
|||
// - soft : fail silently
|
||||
//
|
||||
if (empty($this->registry)) {
|
||||
$this->registry = new PEAR_Registry($this->config->get('php_dir'));
|
||||
$this->registry = &new PEAR_Registry($this->config->get('php_dir'));
|
||||
}
|
||||
$oldcwd = getcwd();
|
||||
$need_download = false;
|
||||
|
@ -453,7 +453,7 @@ class PEAR_Installer extends PEAR_Common
|
|||
|
||||
function checkDeps(&$pkginfo)
|
||||
{
|
||||
$deps = new PEAR_Dependency;
|
||||
$deps = &new PEAR_Dependency($this->registry);
|
||||
$errors = null;
|
||||
if (is_array($pkginfo['release_deps'])) {
|
||||
foreach($pkginfo['release_deps'] as $dep) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue