cvs: pear-core /PEAR ChannelFile.php Common.php Config.php Dependency2.php DependencyDB.php Downloader.php Installer.php PackageFile.php Registry.php
Remote.php RunTest.php Validate.php /PEAR/Command Auth.php Build.php Channels.php Config.php Install.php Mirror.php Package.php Registry.php
Remote.php /PEAR/Downloader Package.php /PEAR/PackageFile v1.php v2.php /PEAR/PackageFile/Generator v1.php v2.php

From: Date: Fri, 11 Mar 2005 20:17:32 +0000
Subject: cvs: pear-core /PEAR ChannelFile.php Common.php Config.php Dependency2.php DependencyDB.php Downloader.php Installer.php PackageFile.php Registry.php
Remote.php RunTest.php Validate.php /PEAR/Command Auth.php Build.php Channels.php Config.php Install.php Mirror.php Package.php Registry.php
Remote.php /PEAR/Downloader Package.php /PEAR/PackageFile v1.php v2.php /PEAR/PackageFile/Generator v1.php v2.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-30219@lists.php.net to get a copy of this message
cellog Fri Mar 11 15:17:32 2005 EDT Modified files: /pear-core/PEAR ChannelFile.php Common.php Config.php Dependency2.php DependencyDB.php Downloader.php Installer.php PackageFile.php Registry.php Remote.php RunTest.php Validate.php /pear-core/PEAR/Command Auth.php Build.php Channels.php Config.php Install.php Mirror.php Package.php Registry.php Remote.php /pear-core/PEAR/Downloader Package.php /pear-core/PEAR/PackageFile/Generator v1.php v2.php /pear-core/PEAR/PackageFile v1.php v2.php Log: feeble attempt to alleviate some memory issues

http://cvs.php.net/diff.php/pear-core/PEAR/ChannelFile.php?r1=1.52&r2=1.53&ty=u Index: pear-core/PEAR/ChannelFile.php diff -u pear-core/PEAR/ChannelFile.php:1.52 pear-core/PEAR/ChannelFile.php:1.53 --- pear-core/PEAR/ChannelFile.php:1.52 Wed Mar 2 21:37:59 2005 +++ pear-core/PEAR/ChannelFile.php Fri Mar 11 15:17:29 2005 @@ -16,11 +16,9 @@ // | Authors: Gregory Beaver <cellog@php.net> | // +----------------------------------------------------------------------+ // -// $Id: ChannelFile.php,v 1.52 2005/03/03 02:37:59 cellog Exp $ +// $Id: ChannelFile.php,v 1.53 2005/03/11 20:17:29 cellog Exp $ require_once 'PEAR/ErrorStack.php'; -require_once 'PEAR/Validate.php'; -require_once 'PEAR/Validator/PECL.php'; require_once 'PEAR/XMLParser.php'; require_once 'PEAR/Common.php'; @@ -1491,6 +1489,9 @@ */ function &getValidationObject($package = false) { + if (!class_exists('PEAR_Validate')) { + require_once 'PEAR/Validate.php'; + } if (!$this->_isValid) { if (!$this->validate()) { $a = false; http://cvs.php.net/diff.php/pear-core/PEAR/Common.php?r1=1.143&r2=1.144&ty=u Index: pear-core/PEAR/Common.php diff -u pear-core/PEAR/Common.php:1.143 pear-core/PEAR/Common.php:1.144 --- pear-core/PEAR/Common.php:1.143 Tue Feb 8 10:22:11 2005 +++ pear-core/PEAR/Common.php Fri Mar 11 15:17:29 2005 @@ -17,12 +17,9 @@ // | Tomas V.V.Cox <cox@idecnet.com> | // +----------------------------------------------------------------------+ // -// $Id: Common.php,v 1.143 2005/02/08 15:22:11 cellog Exp $ +// $Id: Common.php,v 1.144 2005/03/11 20:17:29 cellog Exp $ require_once 'PEAR.php'; -require_once 'PEAR/Frontend.php'; -require_once 'Archive/Tar.php'; -require_once 'System.php'; // {{{ constants and globals @@ -194,6 +191,9 @@ $tempfiles =& $GLOBALS['_PEAR_Common_tempfiles']; while ($file = array_shift($tempfiles)) { if (@is_dir($file)) { + if (!class_exists('System')) { + require_once 'System.php'; + } System::rm(array('-rf', $file)); } elseif (file_exists($file)) { unlink($file); @@ -217,6 +217,9 @@ */ function addTempFile($file) { + if (!class_exists('PEAR_Frontend')) { + require_once 'PEAR/Frontend.php'; + } PEAR_Frontend::addTempFile($file); } @@ -236,6 +239,9 @@ function mkDirHier($dir) { $this->log(2, "+ create dir $dir"); + if (!class_exists('System')) { + require_once 'System.php'; + } return System::mkDir(array('-p', $dir)); } @@ -256,6 +262,9 @@ function log($level, $msg, $append_crlf = true) { if ($this->debug >= $level) { + if (!class_exists('PEAR_Frontend')) { + require_once 'PEAR/Frontend.php'; + } $ui = &PEAR_Frontend::singleton(); if (is_a($ui, 'PEAR_Frontend')) { $ui->log($msg, $append_crlf); @@ -287,6 +296,9 @@ $topt = array(); } $topt = array_merge($topt, array('-d', 'pear')); + if (!class_exists('System')) { + require_once 'System.php'; + } if (!$tmpdir = System::mktemp($topt)) { return false; } @@ -1055,6 +1067,9 @@ */ function downloadHttp($url, &$ui, $save_dir = '.', $callback = null) { + if (!class_exists('PEAR_Downloader')) { + require_once 'PEAR/Downloader.php'; + } return PEAR_Downloader::downloadHttp($url, $ui, $save_dir, $callback); } @@ -1082,6 +1097,4 @@ } require_once 'PEAR/Config.php'; require_once 'PEAR/PackageFile.php'; -require_once 'PEAR/Downloader.php'; - ?> \ No newline at end of file http://cvs.php.net/diff.php/pear-core/PEAR/Config.php?r1=1.97&r2=1.98&ty=u Index: pear-core/PEAR/Config.php diff -u pear-core/PEAR/Config.php:1.97 pear-core/PEAR/Config.php:1.98 --- pear-core/PEAR/Config.php:1.97 Sun Feb 20 20:32:51 2005 +++ pear-core/PEAR/Config.php Fri Mar 11 15:17:29 2005 @@ -17,14 +17,13 @@ // | Greg Beaver <cellog@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Config.php,v 1.97 2005/02/21 01:32:51 cellog Exp $ +// $Id: Config.php,v 1.98 2005/03/11 20:17:29 cellog Exp $ require_once 'PEAR.php'; require_once 'PEAR/Registry.php'; require_once 'PEAR/Installer/Role.php'; require_once 'System.php'; require_once 'PEAR/Remote.php'; -require_once 'PEAR/REST.php'; /** * Last created PEAR_Config instance. @@ -1812,6 +1811,9 @@ */ function &getREST($ui = null) { + if (!class_exists('PEAR_REST')) { + require_once 'PEAR/REST.php'; + } $remote = &new PEAR_REST($ui, $this); return $remote; } http://cvs.php.net/diff.php/pear-core/PEAR/Dependency2.php?r1=1.33&r2=1.34&ty=u Index: pear-core/PEAR/Dependency2.php diff -u pear-core/PEAR/Dependency2.php:1.33 pear-core/PEAR/Dependency2.php:1.34 --- pear-core/PEAR/Dependency2.php:1.33 Sun Feb 20 00:18:54 2005 +++ pear-core/PEAR/Dependency2.php Fri Mar 11 15:17:29 2005 @@ -16,12 +16,9 @@ // | Authors: Greg Beaver <cellog@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Dependency2.php,v 1.33 2005/02/20 05:18:54 cellog Exp $ +// $Id: Dependency2.php,v 1.34 2005/03/11 20:17:29 cellog Exp $ -require_once 'OS/Guess.php'; require_once 'PEAR/Validate.php'; -require_once 'PEAR/DependencyDB.php'; -require_once 'PEAR/Downloader/Package.php'; /** * Dependency check for PEAR packages @@ -77,9 +74,15 @@ { $this->_config = &$config; $this->_registry = &$config->getRegistry(); + if (!class_exists('PEAR_DependencyDB')) { + require_once 'PEAR/DependencyDB.php'; + } $this->_dependencydb = &PEAR_DependencyDB::singleton($config); $this->_options = $installoptions; $this->_state = $state; + if (!class_exists('OS_Guess')) { + require_once 'OS/Guess.php'; + } $this->_os = new OS_Guess; $this->_currentPackage = $package; } @@ -776,6 +779,9 @@ // into using these to validate uninstalls of circular dependencies $downloaded = &$dl->getUninstallPackages(); foreach ($downloaded as $i => $pf) { + if (!class_exists('PEAR_Downloader_Package')) { + require_once 'PEAR/Downloader/Package.php'; + } $dp = &new PEAR_Downloader_Package($dl); $dp->setPackageFile($downloaded[$i]); $params[$i] = &$dp; @@ -922,6 +928,9 @@ } $fail = false; if ($deps) { + if (!class_exists('PEAR_Downloader_Package')) { + require_once 'PEAR/Downloader/Package.php'; + } $dp = &new PEAR_Downloader_Package($dl); if (is_object($pkg)) { $dp->setPackageFile($pkg); http://cvs.php.net/diff.php/pear-core/PEAR/DependencyDB.php?r1=1.19&r2=1.20&ty=u Index: pear-core/PEAR/DependencyDB.php diff -u pear-core/PEAR/DependencyDB.php:1.19 pear-core/PEAR/DependencyDB.php:1.20 --- pear-core/PEAR/DependencyDB.php:1.19 Mon Feb 7 18:55:49 2005 +++ pear-core/PEAR/DependencyDB.php Fri Mar 11 15:17:29 2005 @@ -18,10 +18,9 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: DependencyDB.php,v 1.19 2005/02/07 23:55:49 cellog Exp $ +// $Id: DependencyDB.php,v 1.20 2005/03/11 20:17:29 cellog Exp $ require_once 'PEAR.php'; -require_once 'PEAR/Registry.php'; require_once 'PEAR/Config.php'; /** http://cvs.php.net/diff.php/pear-core/PEAR/Downloader.php?r1=1.62&r2=1.63&ty=u Index: pear-core/PEAR/Downloader.php diff -u pear-core/PEAR/Downloader.php:1.62 pear-core/PEAR/Downloader.php:1.63 --- pear-core/PEAR/Downloader.php:1.62 Thu Mar 3 18:39:43 2005 +++ pear-core/PEAR/Downloader.php Fri Mar 11 15:17:29 2005 @@ -19,18 +19,9 @@ // | Martin Jansen <mj@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Downloader.php,v 1.62 2005/03/03 23:39:43 cellog Exp $ +// $Id: Downloader.php,v 1.63 2005/03/11 20:17:29 cellog Exp $ require_once 'PEAR/Common.php'; -require_once 'PEAR/ChannelFile.php'; -require_once 'PEAR/Registry.php'; -require_once 'PEAR/Dependency2.php'; -require_once 'PEAR/DependencyDB.php'; -require_once 'PEAR/Remote.php'; -require_once 'PEAR/PackageFile.php'; -require_once 'PEAR/Downloader/Package.php'; -require_once 'System.php'; - define('PEAR_INSTALLER_OK', 1); define('PEAR_INSTALLER_FAILED', 0); @@ -187,12 +178,19 @@ $this->log(1, 'Attempting to discover channel "' . $channel . '"...'); PEAR::pushErrorHandling(PEAR_ERROR_RETURN); $callback = $this->ui ? array(&$this, '_downloadCallback') : null; - $a = $this->downloadHttp('http://' . $channel . '/channel.xml', $this->ui, System::mktemp(array('-d')), $callback, false); + if (!class_exists('System')) { + require_once 'System.php'; + } + $a = $this->downloadHttp('http://' . $channel . '/channel.xml', $this->ui, + System::mktemp(array('-d')), $callback, false); PEAR::popErrorHandling(); if (PEAR::isError($a)) { return false; } list($a, $lastmodified) = $a; + if (!class_exists('PEAR/ChannelFile.php')) { + require_once 'PEAR/ChannelFile.php'; + } $b = new PEAR_ChannelFile; if ($b->fromXmlFile($a)) { @unlink($a); @@ -218,6 +216,9 @@ */ function &newDownloaderPackage(&$t) { + if (!class_exists('PEAR_Downloader_Package')) { + require_once 'PEAR/Downloader/Package.php'; + } $a = new PEAR_Downloader_Package($t); return $a; } @@ -231,21 +232,19 @@ */ function &getDependency2Object(&$c, $i, $p, $s) { + if (!class_exists('PEAR/Dependency2.php')) { + require_once 'PEAR/Dependency2.php'; + } $z = &new PEAR_Dependency2($c, $i, $p, $s); return $z; } - /** - * For simpler unit-testing - * @return string - */ - function getDownloaderPackageClass() - { - return 'PEAR_Downloader_Package'; - } - function &download($params) { + if (!count($params)) { + $a = array(); + return $a; + } if (!isset($this->_registry)) { $this->_registry = &$this->config->getRegistry(); } @@ -517,6 +516,9 @@ } $downloaddir = $this->config->get('download_dir'); if (empty($downloaddir)) { + if (!class_exists('System')) { + require_once 'System.php'; + } if (PEAR::isError($downloaddir = System::mktemp('-d'))) { return $downloaddir; } @@ -566,6 +568,9 @@ */ function &getPackagefileObject(&$c, $d, $dir) { + if (!class_exists('PEAR_PackageFile')) { + require_once 'PEAR/PackageFile.php'; + } $a = &new PEAR_PackageFile($c, $d, $dir); return $a; } http://cvs.php.net/diff.php/pear-core/PEAR/Installer.php?r1=1.195&r2=1.196&ty=u Index: pear-core/PEAR/Installer.php diff -u pear-core/PEAR/Installer.php:1.195 pear-core/PEAR/Installer.php:1.196 --- pear-core/PEAR/Installer.php:1.195 Sat Feb 26 22:06:50 2005 +++ pear-core/PEAR/Installer.php Fri Mar 11 15:17:29 2005 @@ -19,11 +19,10 @@ // | Greg Beaver <cellog@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Installer.php,v 1.195 2005/02/27 03:06:50 cellog Exp $ +// $Id: Installer.php,v 1.196 2005/03/11 20:17:29 cellog Exp $ require_once "OS/Guess.php"; require_once 'PEAR/Downloader.php'; -require_once 'PEAR/Task/Common.php'; define('PEAR_INSTALLER_NOBINARY', -240); /** @@ -163,6 +162,17 @@ if (!strlen($package)) { return $this->raiseError("No package to uninstall given"); } + if (strtolower($package) == 'pear' && $channel == 'pear.php.net') { + // to avoid race conditions, include all possible needed files + require_once 'PEAR/Task/Common.php'; + require_once 'PEAR/Task/Replace.php'; + require_once 'PEAR/Task/Unixeol.php'; + require_once 'PEAR/Task/Windowseol.php'; + require_once 'PEAR/PackageFile/v1.php'; + require_once 'PEAR/PackageFile/v2.php'; + require_once 'PEAR/PackageFile/Generator/v1.php'; + require_once 'PEAR/PackageFile/Generator/v2.php'; + } $filelist = $this->_registry->packageInfo($package, 'filelist', $channel); if ($filelist == null) { return $this->raiseError("$channel/$package not installed"); @@ -1208,8 +1218,10 @@ } // }}} $this->configSet('default_channel', $savechannel); - if (PEAR_Task_Common::hasPostinstallTasks()) { - PEAR_Task_Common::runPostinstallTasks($installphase); + if (class_exists('PEAR_Task_Common')) { // this is auto-included if any tasks exist + if (PEAR_Task_Common::hasPostinstallTasks()) { + PEAR_Task_Common::runPostinstallTasks($installphase); + } } return $pkg->toArray(true); } http://cvs.php.net/diff.php/pear-core/PEAR/PackageFile.php?r1=1.16&r2=1.17&ty=u Index: pear-core/PEAR/PackageFile.php diff -u pear-core/PEAR/PackageFile.php:1.16 pear-core/PEAR/PackageFile.php:1.17 --- pear-core/PEAR/PackageFile.php:1.16 Fri Mar 4 11:41:34 2005 +++ pear-core/PEAR/PackageFile.php Fri Mar 11 15:17:29 2005 @@ -16,8 +16,7 @@ // | Authors: Gregory Beaver <cellog@php.net> | // +----------------------------------------------------------------------+ // -// $Id: PackageFile.php,v 1.16 2005/03/04 16:41:34 cellog Exp $ -require_once 'PEAR/Common.php'; +// $Id: PackageFile.php,v 1.17 2005/03/11 20:17:29 cellog Exp $ require_once 'PEAR/Validate.php'; /** * Error code if the package.xml <package> tag does not contain a valid version @@ -32,7 +31,7 @@ * Abstraction for the package.xml package description file * * @author Gregory Beaver <cellog@php.net> - * @version $Revision: 1.16 $ + * @version $Revision: 1.17 $ * @stability devel * @package PEAR */ @@ -231,6 +230,9 @@ */ function &fromTgzFile($file, $state) { + if (!class_exists('Archive_Tar')) { + require_once 'Archive/Tar.php'; + } $tar = new Archive_Tar($file); if ($this->_debug <= 1) { $tar->pushErrorHandling(PEAR_ERROR_RETURN); http://cvs.php.net/diff.php/pear-core/PEAR/Registry.php?r1=1.126&r2=1.127&ty=u Index: pear-core/PEAR/Registry.php diff -u pear-core/PEAR/Registry.php:1.126 pear-core/PEAR/Registry.php:1.127 --- pear-core/PEAR/Registry.php:1.126 Wed Mar 2 21:37:59 2005 +++ pear-core/PEAR/Registry.php Fri Mar 11 15:17:29 2005 @@ -18,7 +18,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: Registry.php,v 1.126 2005/03/03 02:37:59 cellog Exp $ +// $Id: Registry.php,v 1.127 2005/03/11 20:17:29 cellog Exp $ /* TODO: @@ -26,13 +26,8 @@ - Add application level lock (avoid change the registry from the cmdline while using the GTK interface, for ex.) */ -require_once 'System.php'; require_once 'PEAR.php'; -require_once 'PEAR/Installer/Role.php'; require_once 'PEAR/DependencyDB.php'; -require_once 'PEAR/ChannelFile.php'; -require_once 'PEAR/PackageFile.php'; -require_once 'PEAR/PackageFile/v1.php'; define('PEAR_REGISTRY_ERROR_LOCK', -2); define('PEAR_REGISTRY_ERROR_FORMAT', -3); @@ -185,6 +180,9 @@ if (!file_exists($this->channelsdir . $ds . 'pear.php.net.reg')) { $pear_channel = $this->_pearChannel; if (!is_a($pear_channel, 'PEAR_ChannelFile') || !$pear_channel->validate()) { + if (!class_exists('PEAR_ChannelFile')) { + require_once 'PEAR/ChannelFile.php'; + } $pear_channel = new PEAR_ChannelFile; $pear_channel->setName('pear.php.net'); $pear_channel->setAlias('pear'); @@ -201,6 +199,9 @@ if (!file_exists($this->channelsdir . $ds . 'pecl.php.net.reg')) { $pecl_channel = $this->_peclChannel; if (!is_a($pecl_channel, 'PEAR_ChannelFile') || !$pecl_channel->validate()) { + if (!class_exists('PEAR_ChannelFile')) { + require_once 'PEAR/ChannelFile.php'; + } $pecl_channel = new PEAR_ChannelFile; $pecl_channel->setName('pecl.php.net'); $pecl_channel->setAlias('pecl'); @@ -216,6 +217,9 @@ $this->_addChannel($pecl_channel); } if (!file_exists($this->channelsdir . $ds . '__uri.reg')) { + if (!class_exists('PEAR_ChannelFile')) { + require_once 'PEAR/ChannelFile.php'; + } $private = new PEAR_ChannelFile; $private->setName('__uri'); $private->addFunction('xmlrpc', '1.0', '****'); @@ -319,6 +323,7 @@ if (!$this->hasWriteAccess()) { return false; } + require_once 'System.php'; if (!System::mkdir(array('-p', $this->statedir))) { return $this->raiseError("could not create directory '{$this->statedir}'"); } @@ -375,6 +380,7 @@ if (!$this->hasWriteAccess()) { return false; } + require_once 'System.php'; if (!System::mkdir(array('-p', $channelDir))) { return $this->raiseError("could not create directory '" . $channelDir . "'"); @@ -400,6 +406,7 @@ if (!$this->hasWriteAccess()) { return false; } + require_once 'System.php'; if (!System::mkdir(array('-p', $this->channelsdir))) { return $this->raiseError("could not create directory '{$this->channelsdir}'"); } @@ -408,6 +415,7 @@ if (!$this->hasWriteAccess()) { return false; } + require_once 'System.php'; if (!System::mkdir(array('-p', $this->channelsdir . DIRECTORY_SEPARATOR . '.alias'))) { return $this->raiseError("could not create directory '{$this->channelsdir}/.alias'"); } @@ -603,6 +611,9 @@ function _rebuildFileMap() { + if (!class_exists('PEAR_Installer_Role')) { + require_once 'PEAR/Installer/Role.php'; + } $channels = $this->_listAllPackages(); $files = array(); foreach ($channels as $channel => $packages) { @@ -1230,6 +1241,9 @@ $this->_config = &new PEAR_Config; $this->_config->set('php_dir', $this->statedir); } + if (!class_exists('PEAR_PackageFile')) { + require_once 'PEAR/PackageFile.php'; + } $pkg = &new PEAR_PackageFile($this->_config); $pf = &$pkg->fromArray($info); return $pf; @@ -1245,6 +1259,9 @@ { $ch = false; if ($this->_channelExists($channel, $noaliases)) { + if (!class_exists('PEAR_ChannelFile')) { + require_once 'PEAR/ChannelFile.php'; + } $ch = &PEAR_ChannelFile::fromArray($this->_channelInfo($channel, $noaliases)); } if ($ch) { @@ -1252,6 +1269,9 @@ } if ($this->_getChannelFromAlias($channel) == 'pear.php.net') { // the registry is not properly set up, so use defaults + if (!class_exists('PEAR_ChannelFile')) { + require_once 'PEAR/ChannelFile.php'; + } $pear_channel = new PEAR_ChannelFile; $pear_channel->setName('pear.php.net'); $pear_channel->setAlias('pear'); @@ -1261,6 +1281,9 @@ } if ($this->_getChannelFromAlias($channel) == 'pecl.php.net') { // the registry is not properly set up, so use defaults + if (!class_exists('PEAR_ChannelFile')) { + require_once 'PEAR/ChannelFile.php'; + } $pear_channel = new PEAR_ChannelFile; $pear_channel->setName('pecl.php.net'); $pear_channel->setAlias('pecl'); @@ -1271,6 +1294,9 @@ } if ($this->_getChannelFromAlias($channel) == '__uri') { // the registry is not properly set up, so use defaults + if (!class_exists('PEAR_ChannelFile')) { + require_once 'PEAR/ChannelFile.php'; + } $private = new PEAR_ChannelFile; $private->setName('__uri'); $private->addFunction('xmlrpc', '1.0', '****'); @@ -1462,6 +1488,9 @@ $ret = $this->_addPackage($package, $info); $this->_unlock(); if ($ret) { + if (!class_exists('PEAR_PackageFile_v1')) { + require_once 'PEAR/PackageFile/v1.php'; + } $pf = new PEAR_PackageFile_v1; $pf->setConfig($this->_config); $pf->fromArray($info); @@ -1748,6 +1777,9 @@ if (is_array($path)) { static $notempty; if (empty($notempty)) { + if (!class_exists('PEAR_Installer_Role')) { + require_once 'PEAR/Installer/Role.php'; + } $notempty = create_function('$a','return !empty($a);'); } $package = is_array($package) ? array(strtolower($package[0]), strtolower($package[1])) http://cvs.php.net/diff.php/pear-core/PEAR/Remote.php?r1=1.67&r2=1.68&ty=u Index: pear-core/PEAR/Remote.php diff -u pear-core/PEAR/Remote.php:1.67 pear-core/PEAR/Remote.php:1.68 --- pear-core/PEAR/Remote.php:1.67 Thu Feb 17 19:06:49 2005 +++ pear-core/PEAR/Remote.php Fri Mar 11 15:17:30 2005 @@ -16,11 +16,10 @@ // | Author: Stig Bakken <ssb@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Remote.php,v 1.67 2005/02/18 00:06:49 cellog Exp $ +// $Id: Remote.php,v 1.68 2005/03/11 20:17:30 cellog Exp $ require_once 'PEAR.php'; require_once 'PEAR/Config.php'; -require_once 'PEAR/Registry.php'; /** * This is a class for doing remote operations against the central http://cvs.php.net/diff.php/pear-core/PEAR/RunTest.php?r1=1.11&r2=1.12&ty=u Index: pear-core/PEAR/RunTest.php diff -u pear-core/PEAR/RunTest.php:1.11 pear-core/PEAR/RunTest.php:1.12 --- pear-core/PEAR/RunTest.php:1.11 Mon Feb 21 14:59:01 2005 +++ pear-core/PEAR/RunTest.php Fri Mar 11 15:17:30 2005 @@ -18,7 +18,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: RunTest.php,v 1.11 2005/02/21 19:59:01 cellog Exp $ +// $Id: RunTest.php,v 1.12 2005/03/11 20:17:30 cellog Exp $ // /** @@ -53,6 +53,10 @@ */ function PEAR_RunTest($logger = null, $options = array()) { + if (is_null($logger)) { + require_once 'PEAR/Common.php'; + $logger = new PEAR_Common; + } $this->_logger = $logger; $this->_options = $options; } http://cvs.php.net/diff.php/pear-core/PEAR/Validate.php?r1=1.36&r2=1.37&ty=u Index: pear-core/PEAR/Validate.php diff -u pear-core/PEAR/Validate.php:1.36 pear-core/PEAR/Validate.php:1.37 --- pear-core/PEAR/Validate.php:1.36 Wed Mar 2 22:07:08 2005 +++ pear-core/PEAR/Validate.php Fri Mar 11 15:17:30 2005 @@ -16,13 +16,14 @@ // | Authors: Gregory Beaver <cellog@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Validate.php,v 1.36 2005/03/03 03:07:08 cellog Exp $ +// $Id: Validate.php,v 1.37 2005/03/11 20:17:30 cellog Exp $ define('PEAR_VALIDATE_INSTALLING', 1); define('PEAR_VALIDATE_UNINSTALLING', 2); // this is not bit-mapped like the others define('PEAR_VALIDATE_NORMAL', 3); define('PEAR_VALIDATE_DOWNLOADING', 4); // this is not bit-mapped like the others define('PEAR_VALIDATE_PACKAGING', 7); require_once 'PEAR/Common.php'; +require_once 'PEAR/Validator/PECL.php'; class PEAR_Validate { var $packageregex = _PEAR_COMMON_PACKAGE_NAME_PREG; @@ -258,7 +259,7 @@ 'version "' . $version . '" should be "' . implode('.' ,$versioncomponents) . '"'); } else { - $this->_addFailure('version', + $this->_addWarning('version', 'packages with devel stability must be < version 1.0.0'); } return true; http://cvs.php.net/diff.php/pear-core/PEAR/Command/Auth.php?r1=1.16&r2=1.17&ty=u Index: pear-core/PEAR/Command/Auth.php diff -u pear-core/PEAR/Command/Auth.php:1.16 pear-core/PEAR/Command/Auth.php:1.17 --- pear-core/PEAR/Command/Auth.php:1.16 Mon Dec 27 01:33:20 2004 +++ pear-core/PEAR/Command/Auth.php Fri Mar 11 15:17:30 2005 @@ -16,10 +16,9 @@ // | Author: Stig Bakken <ssb@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Auth.php,v 1.16 2004/12/27 06:33:20 cellog Exp $ +// $Id: Auth.php,v 1.17 2005/03/11 20:17:30 cellog Exp $ require_once "PEAR/Command/Common.php"; -require_once "PEAR/Remote.php"; require_once "PEAR/Config.php"; /** http://cvs.php.net/diff.php/pear-core/PEAR/Command/Build.php?r1=1.9&r2=1.10&ty=u Index: pear-core/PEAR/Command/Build.php diff -u pear-core/PEAR/Command/Build.php:1.9 pear-core/PEAR/Command/Build.php:1.10 --- pear-core/PEAR/Command/Build.php:1.9 Thu Jan 8 12:33:13 2004 +++ pear-core/PEAR/Command/Build.php Fri Mar 11 15:17:30 2005 @@ -18,10 +18,9 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: Build.php,v 1.9 2004/01/08 17:33:13 sniper Exp $ +// $Id: Build.php,v 1.10 2005/03/11 20:17:30 cellog Exp $ require_once "PEAR/Command/Common.php"; -require_once "PEAR/Builder.php"; /** * PEAR commands for building extensions. @@ -62,6 +61,7 @@ function doBuild($command, $options, $params) { + require_once 'PEAR/Builder.php'; if (sizeof($params) < 1) { $params[0] = 'package.xml'; } http://cvs.php.net/diff.php/pear-core/PEAR/Command/Channels.php?r1=1.38&r2=1.39&ty=u Index: pear-core/PEAR/Command/Channels.php diff -u pear-core/PEAR/Command/Channels.php:1.38 pear-core/PEAR/Command/Channels.php:1.39 --- pear-core/PEAR/Command/Channels.php:1.38 Wed Feb 23 12:08:31 2005 +++ pear-core/PEAR/Command/Channels.php Fri Mar 11 15:17:30 2005 @@ -17,13 +17,9 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: Channels.php,v 1.38 2005/02/23 17:08:31 cellog Exp $ +// $Id: Channels.php,v 1.39 2005/03/11 20:17:30 cellog Exp $ require_once 'PEAR/Command/Common.php'; -require_once 'PEAR/Downloader.php'; -require_once 'PEAR/Config.php'; -require_once 'PEAR/ChannelFile.php'; -require_once 'System.php'; class PEAR_Command_Channels extends PEAR_Command_Common { @@ -193,6 +189,9 @@ $data = 'no updates available'; } $dl = &$this->getDownloader(); + if (!class_exists('System')) { + require_once 'System.php'; + } $tmpdir = System::mktemp(array('-d')); foreach ($channels as $channel) { $channel = $channel[0]; @@ -226,6 +225,9 @@ $this->ui->outputData("Channel \"$channel\" is up-to-date", $command); continue; } + if (!class_exists('PEAR_ChannelFile')) { + require_once 'PEAR/ChannelFile.php'; + } $channelinfo = new PEAR_ChannelFile; $channelinfo->fromXmlString($info); if ($channelinfo->getErrors()) { @@ -267,6 +269,9 @@ } list($contents, $lastmodified) = $contents; $info = implode('', file($contents)); + if (!class_exists('PEAR_ChannelFile')) { + require_once 'PEAR/ChannelFile.php'; + } $channelinfo = new PEAR_Channelfile; $channelinfo->fromXmlString($info); if ($channelinfo->getErrors()) { @@ -302,6 +307,9 @@ } else { if (strpos($channel, '://')) { $downloader = &$this->getDownloader(); + if (!class_exists('System')) { + require_once 'System.php'; + } $tmpdir = System::mktemp(array('-d')); PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); $loc = $downloader->downloadHttp($channel, $this->ui, $tmpdir); @@ -326,6 +334,9 @@ } fclose($fp); } + if (!class_exists('PEAR_ChannelFile')) { + require_once 'PEAR/ChannelFile.php'; + } $chan = new PEAR_ChannelFile; $chan->fromXmlString($contents); $chan->validate(); @@ -472,6 +483,9 @@ } if (strpos($params[0], '://')) { $downloader = &$this->getDownloader(); + if (!class_exists('System')) { + require_once 'System.php'; + } $tmpdir = System::mktemp(array('-d')); PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); $loc = $downloader->downloadHttp($params[0], $this->ui, $tmpdir, null, false); @@ -494,6 +508,9 @@ } fclose($fp); } + if (!class_exists('PEAR_ChannelFile')) { + require_once 'PEAR/ChannelFile.php'; + } $channel = new PEAR_ChannelFile; PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); $result = $channel->fromXmlString($contents); @@ -532,6 +549,9 @@ function doUpdate($command, $options, $params) { + if (!class_exists('System')) { + require_once 'System.php'; + } $tmpdir = System::mktemp(array('-d')); $reg = &$this->config->getRegistry(); if (sizeof($params) != 1) { @@ -559,6 +579,9 @@ return; } $contents = implode('', file($contents)); + if (!class_exists('PEAR_ChannelFile')) { + require_once 'PEAR/ChannelFile.php'; + } $channel = new PEAR_ChannelFile; $channel->fromXmlString($contents); if (!$channel->getErrors()) { @@ -599,6 +622,9 @@ } fclose($fp); } + if (!class_exists('PEAR_ChannelFile')) { + require_once 'PEAR/ChannelFile.php'; + } $channel = new PEAR_ChannelFile; $channel->fromXmlString($contents); } @@ -633,6 +659,9 @@ function &getDownloader() { + if (!class_exists('PEAR_Downloader')) { + require_once 'PEAR/Downloader.php'; + } $a = new PEAR_Downloader($this->ui, array(), $this->config); return $a; } http://cvs.php.net/diff.php/pear-core/PEAR/Command/Config.php?r1=1.44&r2=1.45&ty=u Index: pear-core/PEAR/Command/Config.php diff -u pear-core/PEAR/Command/Config.php:1.44 pear-core/PEAR/Command/Config.php:1.45 --- pear-core/PEAR/Command/Config.php:1.44 Sun Feb 20 15:58:39 2005 +++ pear-core/PEAR/Command/Config.php Fri Mar 11 15:17:30 2005 @@ -18,10 +18,9 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: Config.php,v 1.44 2005/02/20 20:58:39 cellog Exp $ +// $Id: Config.php,v 1.45 2005/03/11 20:17:30 cellog Exp $ require_once "PEAR/Command/Common.php"; -require_once "PEAR/Config.php"; /** * PEAR commands for managing configuration data. http://cvs.php.net/diff.php/pear-core/PEAR/Command/Install.php?r1=1.91&r2=1.92&ty=u Index: pear-core/PEAR/Command/Install.php diff -u pear-core/PEAR/Command/Install.php:1.91 pear-core/PEAR/Command/Install.php:1.92 --- pear-core/PEAR/Command/Install.php:1.91 Wed Mar 2 22:03:02 2005 +++ pear-core/PEAR/Command/Install.php Fri Mar 11 15:17:30 2005 @@ -16,12 +16,9 @@ // | Author: Stig S?ther Bakken <ssb@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Install.php,v 1.91 2005/03/03 03:03:02 cellog Exp $ +// $Id: Install.php,v 1.92 2005/03/11 20:17:30 cellog Exp $ require_once "PEAR/Command/Common.php"; -require_once "PEAR/Installer.php"; -require_once 'PEAR/Downloader.php'; -require_once 'PEAR/PackageFile/v2.php'; /** * PEAR commands for installation or deinstallation/upgrading of @@ -311,6 +308,9 @@ */ function &getDownloader(&$ui, $options, &$config) { + if (!class_exists('PEAR_Downloader')) { + require_once 'PEAR/Downloader.php'; + } $a = &new PEAR_Downloader($ui, $options, $config); return $a; } @@ -320,6 +320,9 @@ */ function &getInstaller(&$ui) { + if (!class_exists('PEAR_Installer')) { + require_once 'PEAR/Installer.php'; + } $a = &new PEAR_Installer($ui); return $a; } @@ -500,7 +503,7 @@ function doUninstall($command, $options, $params) { if (empty($this->installer)) { - $this->installer = &new PEAR_Installer($this->ui); + $this->installer = &$this->getInstaller($this->ui); } if (isset($options['remoteconfig'])) { $e = $this->config->readFTPConfigFile($options['remoteconfig']); http://cvs.php.net/diff.php/pear-core/PEAR/Command/Mirror.php?r1=1.9&r2=1.10&ty=u Index: pear-core/PEAR/Command/Mirror.php diff -u pear-core/PEAR/Command/Mirror.php:1.9 pear-core/PEAR/Command/Mirror.php:1.10 --- pear-core/PEAR/Command/Mirror.php:1.9 Fri Dec 31 19:26:03 2004 +++ pear-core/PEAR/Command/Mirror.php Fri Mar 11 15:17:30 2005 @@ -17,12 +17,9 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: Mirror.php,v 1.9 2005/01/01 00:26:03 cellog Exp $ +// $Id: Mirror.php,v 1.10 2005/03/11 20:17:30 cellog Exp $ require_once "PEAR/Command/Common.php"; -require_once "PEAR/Command.php"; -require_once "PEAR/Remote.php"; -require_once "PEAR.php"; /** * PEAR commands for providing file mirrors http://cvs.php.net/diff.php/pear-core/PEAR/Command/Package.php?r1=1.96&r2=1.97&ty=u Index: pear-core/PEAR/Command/Package.php diff -u pear-core/PEAR/Command/Package.php:1.96 pear-core/PEAR/Command/Package.php:1.97 --- pear-core/PEAR/Command/Package.php:1.96 Wed Mar 2 21:58:36 2005 +++ pear-core/PEAR/Command/Package.php Fri Mar 11 15:17:30 2005 @@ -18,17 +18,9 @@ // | Greg Beaver <cellog@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Package.php,v 1.96 2005/03/03 02:58:36 cellog Exp $ +// $Id: Package.php,v 1.97 2005/03/11 20:17:30 cellog Exp $ -require_once 'PEAR/Common.php'; -require_once 'PEAR/Packager.php'; require_once 'PEAR/Command/Common.php'; -require_once 'PEAR/RunTest.php'; -require_once "Archive/Tar.php"; -require_once "System.php"; -require_once "PEAR/Installer.php"; -require_once "OS/Guess.php"; -require_once 'PEAR/Dependency2.php'; class PEAR_Command_Package extends PEAR_Command_Common { @@ -294,12 +286,21 @@ // }}} function &getPackager() { + if (!class_exists('PEAR_Packager')) { + require_once 'PEAR/Packager.php'; + } $a = &new PEAR_Packager; return $a; } function getPackageFile($config, $debug = false, $tmpdir = null) { + if (!class_exists('PEAR_Common')) { + require_once 'PEAR/Common.php'; + } + if (!class_exists('PEAR/PackageFile.php')) { + require_once 'PEAR/PackageFile.php'; + } $a = &new PEAR_PackageFile($config, $debug, $tmpdir); $common = new PEAR_Common; $common->ui = $this->ui; @@ -526,6 +527,9 @@ function doRunTests($command, $options, $params) { + require_once 'PEAR/Common.php'; + require_once 'PEAR/RunTest.php'; + require_once "System.php"; $log = new PEAR_Common; $log->ui = &$this->ui; // slightly hacky, but it will work $run = new PEAR_RunTest($log, $options); @@ -706,6 +710,7 @@ $data['data'][] = array($req, $type, $name, $rel, $version); } } else { // package.xml 2.0 dependencies display + require_once 'PEAR/Dependency2.php'; $deps = $info->getDependencies(); $reg = &$this->config->getRegistry(); if (is_array($deps)) { @@ -782,6 +787,8 @@ function doSign($command, $options, $params) { + require_once "System.php"; + require_once "Archive/Tar.php"; // should move most of this code into PEAR_Packager // so it'll be easy to implement "pear package --sign" if (sizeof($params) != 1) { @@ -845,6 +852,8 @@ function doMakeRPM($command, $options, $params) { + require_once "System.php"; + require_once "Archive/Tar.php"; if (sizeof($params) != 1) { return $this->raiseError("bad parameter(s), try \"help $command\""); } @@ -940,6 +949,7 @@ } } if ($srcfiles > 0) { + require_once 'OS/Guess.php'; $os = new OS_Guess; $arch = $os->getCpu(); } else { http://cvs.php.net/diff.php/pear-core/PEAR/Command/Registry.php?r1=1.61&r2=1.62&ty=u Index: pear-core/PEAR/Command/Registry.php diff -u pear-core/PEAR/Command/Registry.php:1.61 pear-core/PEAR/Command/Registry.php:1.62 --- pear-core/PEAR/Command/Registry.php:1.61 Mon Feb 21 02:11:50 2005 +++ pear-core/PEAR/Command/Registry.php Fri Mar 11 15:17:30 2005 @@ -17,12 +17,9 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: Registry.php,v 1.61 2005/02/21 07:11:50 cellog Exp $ +// $Id: Registry.php,v 1.62 2005/03/11 20:17:30 cellog Exp $ require_once 'PEAR/Command/Common.php'; -require_once 'PEAR/Registry.php'; -require_once 'PEAR/Config.php'; -require_once 'PEAR/PackageFile.php'; class PEAR_Command_Registry extends PEAR_Command_Common { @@ -185,6 +182,9 @@ if (!is_dir($params[0]) && (file_exists($params[0]) || $fp = @fopen($params[0], 'r'))) { @fclose($fp); + if (!class_exists('PEAR_PackageFile')) { + require_once 'PEAR/PackageFile.php'; + } $pkg = &new PEAR_PackageFile($this->config, $this->_debug); PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); $info = &$pkg->fromAnyFile($params[0], PEAR_VALIDATE_NORMAL); @@ -338,6 +338,9 @@ $reg = &$this->config->getRegistry(); if ((@is_file($params[0]) && !is_dir($params[0])) || $fp = @fopen($params[0], 'r')) { @fclose($fp); + if (!class_exists('PEAR_PackageFile')) { + require_once 'PEAR/PackageFile.php'; + } $pkg = &new PEAR_PackageFile($this->config, $this->_debug); PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); $obj = &$pkg->fromAnyFile($params[0], PEAR_VALIDATE_NORMAL); http://cvs.php.net/diff.php/pear-core/PEAR/Command/Remote.php?r1=1.62&r2=1.63&ty=u Index: pear-core/PEAR/Command/Remote.php diff -u pear-core/PEAR/Command/Remote.php:1.62 pear-core/PEAR/Command/Remote.php:1.63 --- pear-core/PEAR/Command/Remote.php:1.62 Thu Feb 17 19:12:42 2005 +++ pear-core/PEAR/Command/Remote.php Fri Mar 11 15:17:31 2005 @@ -17,13 +17,9 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: Remote.php,v 1.62 2005/02/18 00:12:42 cellog Exp $ +// $Id: Remote.php,v 1.63 2005/03/11 20:17:31 cellog Exp $ require_once 'PEAR/Command/Common.php'; -require_once 'PEAR/Common.php'; -require_once 'PEAR/Remote.php'; -require_once 'PEAR/Registry.php'; -require_once 'PEAR/Downloader.php'; class PEAR_Command_Remote extends PEAR_Command_Common { @@ -383,6 +379,9 @@ // }}} function &getDownloader($options) { + if (!class_exists('PEAR_Downloader')) { + require_once 'PEAR/Downloader.php'; + } $a = &new PEAR_Downloader($this->ui, $options, $this->config); return $a; } @@ -427,6 +426,7 @@ function doListUpgrades($command, $options, $params) { + require_once 'PEAR/Common.php'; $savechannel = $channel = $this->config->get('default_channel'); $reg = &$this->config->getRegistry(); foreach ($reg->listChannels() as $channel) { http://cvs.php.net/diff.php/pear-core/PEAR/Downloader/Package.php?r1=1.58&r2=1.59&ty=u Index: pear-core/PEAR/Downloader/Package.php diff -u pear-core/PEAR/Downloader/Package.php:1.58 pear-core/PEAR/Downloader/Package.php:1.59 --- pear-core/PEAR/Downloader/Package.php:1.58 Sat Feb 26 22:21:29 2005 +++ pear-core/PEAR/Downloader/Package.php Fri Mar 11 15:17:31 2005 @@ -16,8 +16,7 @@ // | Authors: Gregory Beaver <cellog@php.net> | // +----------------------------------------------------------------------+ // -// $Id: Package.php,v 1.58 2005/02/27 03:21:29 cellog Exp $ -require_once 'Archive/Tar.php'; +// $Id: Package.php,v 1.59 2005/03/11 20:17:31 cellog Exp $ /** * Coordinates download parameters and manages their dependencies * prior to downloading them. @@ -1215,6 +1214,7 @@ return $err; } if ($this->_rawpackagefile) { + require_once 'Archive/Tar.php'; $tar = &new Archive_Tar($file); $packagexml = $tar->extractInString('package2.xml'); if (!$packagexml) { http://cvs.php.net/diff.php/pear-core/PEAR/PackageFile/Generator/v1.php?r1=1.49&r2=1.50&ty=u Index: pear-core/PEAR/PackageFile/Generator/v1.php diff -u pear-core/PEAR/PackageFile/Generator/v1.php:1.49 pear-core/PEAR/PackageFile/Generator/v1.php:1.50 --- pear-core/PEAR/PackageFile/Generator/v1.php:1.49 Sun Feb 27 22:19:23 2005 +++ pear-core/PEAR/PackageFile/Generator/v1.php Fri Mar 11 15:17:31 2005 @@ -17,7 +17,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: v1.php,v 1.49 2005/02/28 03:19:23 cellog Exp $ +// $Id: v1.php,v 1.50 2005/03/11 20:17:31 cellog Exp $ require_once 'PEAR/Validate.php'; require_once 'System.php'; require_once 'PEAR/PackageFile/v2.php'; @@ -53,6 +53,7 @@ */ function toTgz(&$packager, $compress = true, $where = null) { + require_once 'Archive/Tar.php'; if ($where === null) { if (!($where = System::mktemp(array('-d')))) { return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: mktemp failed'); http://cvs.php.net/diff.php/pear-core/PEAR/PackageFile/Generator/v2.php?r1=1.23&r2=1.24&ty=u Index: pear-core/PEAR/PackageFile/Generator/v2.php diff -u pear-core/PEAR/PackageFile/Generator/v2.php:1.23 pear-core/PEAR/PackageFile/Generator/v2.php:1.24 --- pear-core/PEAR/PackageFile/Generator/v2.php:1.23 Sat Feb 26 17:49:37 2005 +++ pear-core/PEAR/PackageFile/Generator/v2.php Fri Mar 11 15:17:31 2005 @@ -18,7 +18,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: v2.php,v 1.23 2005/02/26 22:49:37 cellog Exp $ +// $Id: v2.php,v 1.24 2005/03/11 20:17:31 cellog Exp $ require_once 'System.php'; /** @@ -127,6 +127,7 @@ */ function toTgz2(&$packager, &$pf1, $compress = true, $where = null) { + require_once 'Archive/Tar.php'; if (!$this->_packagefile->isEquivalent($pf1)) { return PEAR::raiseError('PEAR_Packagefile_v2::toTgz: "' . basename($pf1->getPackageFile()) . @@ -869,7 +870,7 @@ // | Authors: Stephan Schmidt <schst@php-tools.net> | // +----------------------------------------------------------------------+ // -// $Id: v2.php,v 1.23 2005/02/26 22:49:37 cellog Exp $ +// $Id: v2.php,v 1.24 2005/03/11 20:17:31 cellog Exp $ /** * error code for invalid chars in XML name http://cvs.php.net/diff.php/pear-core/PEAR/PackageFile/v1.php?r1=1.47&r2=1.48&ty=u Index: pear-core/PEAR/PackageFile/v1.php diff -u pear-core/PEAR/PackageFile/v1.php:1.47 pear-core/PEAR/PackageFile/v1.php:1.48 --- pear-core/PEAR/PackageFile/v1.php:1.47 Tue Feb 8 00:43:32 2005 +++ pear-core/PEAR/PackageFile/v1.php Fri Mar 11 15:17:31 2005 @@ -17,10 +17,8 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: v1.php,v 1.47 2005/02/08 05:43:32 cellog Exp $ -require_once 'PEAR/PackageFile/Generator/v1.php'; +// $Id: v1.php,v 1.48 2005/03/11 20:17:31 cellog Exp $ require_once 'PEAR/ErrorStack.php'; -require_once 'Archive/Tar.php'; /** * Error code if parsing is attempted with no xml extension @@ -1175,6 +1173,9 @@ function &getDefaultGenerator() { + if (!class_exists('PEAR_PackageFile_Generator_v1')) { + require_once 'PEAR/PackageFile/Generator/v1.php'; + } $a = &new PEAR_PackageFile_Generator_v1($this); return $a; } @@ -1195,6 +1196,9 @@ return implode('', file($file)); } } else { // tgz + if (!class_exists('Archive_Tar')) { + require_once 'Archive/Tar.php'; + } $tar = &new Archive_Tar($this->_archiveFile); $tar->pushErrorHandling(PEAR_ERROR_RETURN); if ($file != 'package.xml' && $file != 'package2.xml') { http://cvs.php.net/diff.php/pear-core/PEAR/PackageFile/v2.php?r1=1.88&r2=1.89&ty=u Index: pear-core/PEAR/PackageFile/v2.php diff -u pear-core/PEAR/PackageFile/v2.php:1.88 pear-core/PEAR/PackageFile/v2.php:1.89 --- pear-core/PEAR/PackageFile/v2.php:1.88 Thu Mar 3 21:13:22 2005 +++ pear-core/PEAR/PackageFile/v2.php Fri Mar 11 15:17:31 2005 @@ -17,12 +17,8 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: v2.php,v 1.88 2005/03/04 02:13:22 cellog Exp $ +// $Id: v2.php,v 1.89 2005/03/11 20:17:31 cellog Exp $ require_once 'PEAR/ErrorStack.php'; -require_once 'PEAR/Validate.php'; -require_once 'PEAR/Dependency2.php'; -require_once 'PEAR/PackageFile/Generator/v2.php'; -require_once 'PEAR/PackageFile/v2/Validator.php'; /** * @author Greg Beaver <cellog@php.net> * @package PEAR @@ -136,6 +132,9 @@ */ function &getPEARDependency2(&$c, $o, $p, $s = PEAR_VALIDATE_INSTALLING) { + if (!class_exists('PEAR_Dependency2')) { + require_once 'PEAR/Dependency2.php'; + } $z = &new PEAR_Dependency2($c, $o, $p, $s); return $z; } @@ -2773,6 +2772,9 @@ function &getDefaultGenerator() { + if (!class_exists('PEAR_PackageFile_Generator_v2')) { + require_once 'PEAR/PackageFile/Generator/v2.php'; + } $a = &new PEAR_PackageFile_Generator_v2($this); return $a; } @@ -2866,6 +2868,9 @@ return false; } if (!isset($this->_v2Validator)) { + if (!class_exists('PEAR_PackageFile_v2_Validator')) { + require_once 'PEAR/PackageFile/v2/Validator.php'; + } $this->_v2Validator = new PEAR_PackageFile_v2_Validator; } if (isset($this->_packageInfo['xsdversion'])) {
« previous php.pear.cvs (#30219) next »