cvs: php4 /pear/PEAR Dependency.php Installer.php
| From: | Tomas V.V.Cox | Date: | Tue, 09 Apr 2002 14:12:13 +0000 |
| Subject: | cvs: php4 /pear/PEAR Dependency.php Installer.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-3186@lists.php.net to get a copy of this message | ||
cox Tue Apr 9 10:12:13 2002 EDT
Modified files:
/php4/pear/PEAR Installer.php Dependency.php
Log:
Make the dependencies check look for the correct registry file
Index: php4/pear/PEAR/Installer.php
diff -u php4/pear/PEAR/Installer.php:1.45 php4/pear/PEAR/Installer.php:1.46
--- php4/pear/PEAR/Installer.php:1.45 Tue Apr 9 04:10:11 2002
+++ php4/pear/PEAR/Installer.php Tue Apr 9 10:12:12 2002
@@ -17,7 +17,7 @@
// | Tomas V.V.Cox <cox@idecnet.com> |
// +----------------------------------------------------------------------+
//
-// $Id: Installer.php,v 1.45 2002/04/09 08:10:11 ssb Exp $
+// $Id: Installer.php,v 1.46 2002/04/09 14:12:12 cox Exp $
require_once 'PEAR/Common.php';
require_once 'PEAR/Registry.php';
@@ -238,7 +238,7 @@
// - 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 @@
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) {
Index: php4/pear/PEAR/Dependency.php
diff -u php4/pear/PEAR/Dependency.php:1.5 php4/pear/PEAR/Dependency.php:1.6
--- php4/pear/PEAR/Dependency.php:1.5 Thu Feb 28 03:27:16 2002
+++ php4/pear/PEAR/Dependency.php Tue Apr 9 10:12:12 2002
@@ -17,7 +17,7 @@
// | Stig Bakken <ssb@fast.no> |
// +----------------------------------------------------------------------+
//
-// $Id: Dependency.php,v 1.5 2002/02/28 08:27:16 sebastian Exp $
+// $Id: Dependency.php,v 1.6 2002/04/09 14:12:12 cox Exp $
/**
* Methods for dependencies check. Based on Stig's dependencies RFC
@@ -29,7 +29,10 @@
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 @@
*/
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";
}