cvs: pear-core / package-PEAR.xml package2.xml /PEAR RunTest.php /PEAR/Command Test.php Test.xml /PEAR/Frontend CLI.php
| From: | Greg Beaver | Date: | Tue, 28 Mar 2006 05:33:43 +0000 |
| Subject: | cvs: pear-core / package-PEAR.xml package2.xml /PEAR RunTest.php /PEAR/Command Test.php Test.xml /PEAR/Frontend CLI.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-39381@lists.php.net to get a copy of this message | ||
cellog Tue Mar 28 05:33:43 2006 UTC
Modified files:
/pear-core package-PEAR.xml package2.xml
/pear-core/PEAR RunTest.php
/pear-core/PEAR/Command Test.php Test.xml
/pear-core/PEAR/Frontend CLI.php
Log:
windows -> unix line endings (forgot to reset the stupid thing after editing .bat files :()
http://cvs.php.net/viewcvs.cgi/pear-core/package-PEAR.xml?r1=1.361&r2=1.362&diff_format=u Index: pear-core/package-PEAR.xml diff -u pear-core/package-PEAR.xml:1.361 pear-core/package-PEAR.xml:1.362 --- pear-core/package-PEAR.xml:1.361 Tue Mar 28 04:56:06 2006 +++ pear-core/package-PEAR.xml Tue Mar 28 05:33:42 2006 @@ -1,679 +1,679 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!--DOCTYPE package SYSTEM "http://pear.php.net/dtd/package-1.0"--> -<package version="1.0" xmlns="http://pear.php.net/dtd/package-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/package-1.0 -http://pear.php.net/dtd/package-1.0.xsd"> - <name>PEAR</name> - <summary>PEAR Base System</summary> - <description>The PEAR package contains: - * the PEAR installer, for creating, distributing - and installing packages - * the beta-quality PEAR_Exception PHP5 error handling mechanism - * the beta-quality PEAR_ErrorStack advanced error handling mechanism - * the PEAR_Error error handling mechanism - * the OS_Guess class for retrieving info about the OS - where PHP is running on - * the System class for quick handling of common operations - with files and directories - * the PEAR base class - - New features in a nutshell: - * full support for channels - * pre-download dependency validation - * new package.xml 2.0 format allows tremendous flexibility while maintaining BC - * support for optional dependency groups and limited support for sub-packaging - * robust dependency support - * full dependency validation on uninstall - * remote install for hosts with only ftp access - no more problems with - restricted host installation - * full support for mirroring - * support for bundling several packages into a single tarball - * support for static dependencies on a url-based package - * support for custom file roles and installation tasks - - NOTE: users of PEAR_Frontend_Web/PEAR_Frontend_Gtk must upgrade their installations - to the latest version, or PEAR will not upgrade properly - </description> - <maintainers> - <maintainer> - <user>cellog</user> - <role>lead</role> - <name>Greg Beaver</name> - <email>cellog@php.net</email> - </maintainer> - <maintainer> - <user>ssb</user> - <role>lead</role> - <name>Stig Bakken</name> - <email>stig@php.net</email> - </maintainer> - <maintainer> - <user>cox</user> - <role>lead</role> - <name>Tomas V.V.Cox</name> - <email>cox@idecnet.com</email> - </maintainer> - <maintainer> - <user>pajoye</user> - <role>lead</role> - <name>Pierre-Alain Joye</name> - <email>pajoye@pearfr.org</email> - </maintainer> - <maintainer> - <user>timj</user> - <role>helper</role> - <name>Tim Jackson</name> - <email>timj@php.net</email> - </maintainer> - <maintainer> - <user>toggg</user> - <role>helper</role> - <name>Bertrand Gugger</name> - <email>toggg@php.net</email> - </maintainer> - <maintainer> - <user>mj</user> - <role>helper</role> - <name>Martin Jansen</name> - <email>mj@php.net</email> - </maintainer> - </maintainers> - <release> - <version>1.5.0a1</version> - <date>2006-05-01</date> - <license>PHP License</license> - <state>alpha</state> - <notes> - Minor feature addition/bugfixes - * fix Bug #6931: pear upgrade PEAR-alpha tries to upgrade to 1.4.0a12 - * fix Bug #7021: Everything must be within <dir name="/"> - * fix Bug #7196: PEAR crashes when using autoload_prepend_file - * fix Bug #7207: proxy user/pass is not urldecoded in download - * fix Bug #7219: bogus "will download PEAR 1.4.8" error - * fix Bug #7221: pear install blah-alpha won't install a newer stable - * implement Request #6614: use go-pear style dialogs in PEAR_Command_CLI by default - * implement Request #6702: implement TAP output option for run-tests command - (as defined by http://perldoc.perl.org/Test/Harness/TAP.html) - * implement Request #7090: PEAR_Downloader mustn't contact pear server - when installing local package file - </notes> - <provides type="class" name="OS_Guess"/> - <provides type="class" name="System"/> - <provides type="function" name="md5_file"/> - <deps> - <dep type="php" rel="ge" version="4.3.0"/> - <dep type="pkg" rel="ge" version="1.3.3">PEAR</dep> - <dep type="pkg" rel="ge" version="1.3.1">Archive_Tar</dep> - <dep type="pkg" rel="ge" version="1.2">Console_Getopt</dep> - <dep type="pkg" rel="ge" version="1.4.0" optional="yes">XML_RPC</dep> - <dep type="pkg" rel="ge" version="0.5.0" optional="yes">PEAR_Frontend_Web</dep> - <dep type="pkg" rel="ge" version="0.4.0" optional="yes">PEAR_Frontend_Gtk</dep> - <dep type="ext" rel="has">xml</dep> - <dep type="ext" rel="has">pcre</dep> - </deps> - <filelist> - <dir name="OS"> - <file role="php" name="Guess.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <dir name="PEAR"> - <dir name="ChannelFile"> - <file name="Parser.php" role="php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <dir name="Command"> - <file role="php" name="Auth.xml"/> - <file role="php" name="Auth.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Build.xml"/> - <file role="php" name="Build.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Channels.xml"/> - <file role="php" name="Channels.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Common.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Config.xml"/> - <file role="php" name="Config.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Install.xml"/> - <file role="php" name="Install.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Package.xml"/> - <file role="php" name="Package.php"> - <replace from="@DATA-DIR@" to="data_dir" type="pear-config"/> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Pickle.xml"/> - <file role="php" name="Pickle.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Registry.xml"/> - <file role="php" name="Registry.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Remote.xml"/> - <file role="php" name="Remote.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Mirror.xml"/> - <file role="php" name="Mirror.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Test.xml"/> - <file role="php" name="Test.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <dir name="Downloader"> - <file role="php" name="Package.php"> - <replace from="@PEAR-VER@" to="version" type="package-info"/> - </file> - </dir> - <dir name="Frontend"> - <file role="php" name="CLI.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <dir name="Installer"> - <dir name="Role"> - <file role="php" name="Common.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Data.xml"/> - <file role="php" name="Data.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Doc.xml"/> - <file role="php" name="Doc.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Ext.xml"/> - <file role="php" name="Ext.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Php.xml"/> - <file role="php" name="Php.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Script.xml"/> - <file role="php" name="Script.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Src.xml"/> - <file role="php" name="Src.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Test.xml"/> - <file role="php" name="Test.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <file role="php" name="Role.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <dir name="PackageFile"> - <dir name="Generator"> - <file role="php" name="v1.php"> - <replace from="@PEAR-VER@" to="version" type="package-info"/> - </file> - <file role="php" name="v2.php"> - <replace from="@PEAR-VER@" to="version" type="package-info"/> - </file> - </dir> - <dir name="Parser"> - <file role="php" name="v1.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="v2.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <dir name="v2"> - <file role="php" name="rw.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Validator.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <file role="php" name="v1.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="v2.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <dir name="REST"> - <file role="php" name="10.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="11.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <dir name="Task"> - <dir name="Postinstallscript"> - <file role="php" name="rw.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <dir name="Replace"> - <file role="php" name="rw.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <dir name="Unixeol"> - <file role="php" name="rw.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <dir name="Windowseol"> - <file role="php" name="rw.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <file role="php" name="Common.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Postinstallscript.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Replace.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Unixeol.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Windowseol.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <dir name="Validator"> - <file role="php" name="PECL.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <file role="php" name="Autoloader.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Builder.php"> - <replace from="@PEAR-VER@" to="version" type="package-info"/> - </file> - <file role="php" name="ChannelFile.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Command.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Common.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Config.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Dependency.php"/> - <file role="php" name="DependencyDB.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Dependency2.php"> - <replace from="@PEAR-VER@" to="version" type="package-info"/> - </file> - <file role="php" name="Downloader.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="ErrorStack.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Exception.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Frontend.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Installer.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Packager.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="PackageFile.php"> - <replace from="@PEAR-VER@" to="version" type="package-info"/> - </file> - <file role="php" name="Registry.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Remote.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="REST.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="RunTest.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Validate.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="XMLParser.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <dir name="scripts" baseinstalldir="/"> - <file role="script" install-as="pear" name="pear.sh" platform="!windows"> - <replace from="@php_bin@" to="php_bin" type="pear-config"/> - <replace from="@php_dir@" to="php_dir" type="pear-config"/> - <replace from="@pear_version@" to="version" type="package-info"/> - <replace from="@include_path@" to="php_dir" type="pear-config"/> - </file> - <file role="script" install-as="peardev" name="peardev.sh" platform="!windows"> - <replace from="@php_bin@" to="php_bin" type="pear-config"/> - <replace from="@php_dir@" to="php_dir" type="pear-config"/> - <replace from="@pear_version@" to="version" type="package-info"/> - <replace from="@include_path@" to="php_dir" type="pear-config"/> - </file> - <file role="script" install-as="pecl" name="pecl.sh" platform="!windows"> - <replace from="@php_bin@" to="php_bin" type="pear-config"/> - <replace from="@php_dir@" to="php_dir" type="pear-config"/> - <replace from="@pear_version@" to="version" type="package-info"/> - <replace from="@include_path@" to="php_dir" type="pear-config"/> - </file> - <file role="script" platform="windows" install-as="peardev.bat" name="peardev.bat"> - <replace from="@bin_dir@" to="bin_dir" type="pear-config"/> - <replace from="@php_bin@" to="php_bin" type="pear-config"/> - <replace from="@include_path@" to="php_dir" type="pear-config"/> - </file> - <file role="script" platform="windows" install-as="pear.bat" name="pear.bat"> - <replace from="@bin_dir@" to="bin_dir" type="pear-config"/> - <replace from="@php_bin@" to="php_bin" type="pear-config"/> - <replace from="@include_path@" to="php_dir" type="pear-config"/> - </file> - <file role="script" platform="windows" install-as="pecl.bat" name="pecl.bat"> - <replace from="@bin_dir@" to="bin_dir" type="pear-config"/> - <replace from="@php_bin@" to="php_bin" type="pear-config"/> - <replace from="@include_path@" to="php_dir" type="pear-config"/> - </file> - <file role="php" install-as="pearcmd.php" name="pearcmd.php"> - <replace from="@php_bin@" to="php_bin" type="pear-config"/> - <replace from="@php_dir@" to="php_dir" type="pear-config"/> - <replace from="@pear_version@" to="version" type="package-info"/> - <replace from="@include_path@" to="php_dir" type="pear-config"/> - </file> - <file role="php" install-as="peclcmd.php" name="peclcmd.php"> - <replace from="@php_bin@" to="php_bin" type="pear-config"/> - <replace from="@php_dir@" to="php_dir" type="pear-config"/> - <replace from="@pear_version@" to="version" type="package-info"/> - <replace from="@include_path@" to="php_dir" type="pear-config"/> - </file> - </dir> - <file role="data" name="package.dtd"/> - <file role="data" name="template.spec"/> - <file role="php" name="PEAR.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="System.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </filelist> - </release> - <changelog> - <release> - <version>1.4.0</version> - <date>2005-09-18</date> - <license>PHP License</license> - <state>stable</state> - <notes> - This is a major milestone release for PEAR. In addition to several killer features, - every single element of PEAR has a regression test, and so stability is much higher - than any previous PEAR release. - - New features in a nutshell: - * full support for channels - * pre-download dependency validation - * new package.xml 2.0 format allows tremendous flexibility while maintaining BC - * support for optional dependency groups and limited support for sub-packaging - * robust dependency support - * full dependency validation on uninstall - * remote install for hosts with only ftp access - no more problems with - restricted host installation - * full support for mirroring - * support for bundling several packages into a single tarball - * support for static dependencies on a url-based package - * support for custom file roles and installation tasks - - NOTE: users of PEAR_Frontend_Web/PEAR_Frontend_Gtk must upgrade their installations - to the latest version, or PEAR will not upgrade properly - </notes> - </release> - <release> - <version>1.4.1</version> - <date>2005-09-25</date> - <license>PHP License</license> - <state>stable</state> - <notes> - Major bugfix release. This is a recommended download for ALL PEAR users - - UPGRADING FROM 1.4.0 WILL CAUSE A SERIES OF NOTICES. IGNORE THEM. - THIS IS CAUSED BY A BUG IN 1.4.0 THAT IS FIXED IN 1.4.1 - - * fix prompt processing in post-install scripts - * make dual package.xml equivalency stricter when using package.xml/package2.xml - * fix critical error in validating bogus php dependencies of package.xml 1.0 - This error has existed for every PEAR version, and allows dependencies like: - <dep type="php" rel="has">4.3.0</dep> to - slip through unnoticed - * re-enable php-const replacements - * PEAR_PackageFile_v2::getConfigureOptions() was missing!! - * fix cvsdiff command - * fix xml encoding issues finally - * clean up package.xml 1.0 dir/file parsing - * fix invalid PEAR_Config generation - * change the user agent from PHP/phpversion to PEAR/pearversion/PHP/phpversion - * don't use a bogus uri for licenses on running convert command - * add "pickle" command for PECL packaging - * add validation warning if the release date in package.xml is not today when packaging - * implement progress bar for list-all/remote-list - * fix Bug #5323: pear search returns odd version numbers - * fix Bug #5428: pear cvstag package2.xml does not include the package.xml - * fix Bug #5449: pear makerpm completely broken for package.xml 2.0 - * fix Bug #5462: raiseError method does not return by ref anymore - * fix Bug #5465: pear install --offline fails to display error - * fix Bug #5477: Bug in Downloader.php and Dependency2.php - * fix Bug #5481: "pear install PECLextension" should display warning to use pecl command - * fix Bug #5482: installation of PECL packages should say add extensions to php.ini - * fix Bug #5483: pecl uninstall crack fatal error - * fix Bug #5487: PECL: compiled files are not uninstalled via the uninstall command - * fix Bug #5488: pecl uninstall package fails if package has a package.xml 1.0 - * fix Bug #5501: the commands list mentions XML-RPC - * fix Bug #5509: addDependecyGroup does not validate group name - * fix Bug #5513: PEAR 1.4 does not install non-pear.php.net packages - </notes> - </release> - <release> - <version>1.4.2</version> - <date>2005-10-08</date> - <license>PHP License</license> - <state>stable</state> - <notes> - Minor bugfix release - - * fix issues with API for adding tasks to package2.xml - * fix Bug #5520: pecl pickle fails on pecl pickle fails on extension/package deps - * fix Bug #5523: pecl pickle misses to put configureoptions into package.xml v1 - * fix Bug #5527: No need for cpp - * fix Bug #5529: configure options in package.xml 2.0 will be ignored - * fix Bug #5530: PEAR_PackageFile_v2->getConfigureOptions() API incompatible with v1 - * fix Bug #5531: adding of installconditions/binarypackage/configure options - to extsrc may fail - * fix Bug #5550: PHP notices/warnings/errors are 1 file off in trace - * fix Bug #5580: pear makerpm XML_sql2xml-0.3.2.tgz error - * fix Bug #5619: pear makerpm produces invalid .spec dependancy code - * fix Bug #5629: pear install http_download dies with bad error message - </notes> - </release> - <release> - <version>1.4.3</version> - <date>2005-11-03</date> - <license>PHP License</license> - <state>stable</state> - <notes> - MINOR SECURITY FIX release - - A security vulnerability has been discovered in all - PEAR versions (1.0 to 1.4.2). This vulnerability has been fixed, - and this is a recommended upgrade for all users. - - Run "pear channel-update" after upgrading for exponentially - faster list-all/remote-list!! - - * fix installation of files named like ".test" - * fix base class for writeable unixeol/windowseol classes - * fix running of post-install scripts with empty or no paramgroup - in CLI frontend - * fix validation of <postinstallscript> - * fix writeable PEAR_Task_Postinstallscript_rw class - * fix error in REST-based search command if searching through description - as well - * silence warning on list-upgrades/upgrade-all if no releases exist at a channel - * add checks for updated channel.xml in all remote commands - * fix pecl script if safe_mode is enabled by default - * implement SERIOUS improvement in list-all/remote-list speed. From 6 minutes - down to about 16-30 seconds - * implement --loose option to avoid recommended version validation - * implement Request #5527: alternative approach to determining glibc version - * fix Bug #5717: analyzeSourceCode() fails to process certain - quote situations properly - * fix Bug #5736: if registry can't lock registry or open filemap, - checkFileMap(), no error - * fix Bug #5676: pear config-create broken - * fix Bug #5683: Deadlock with (almost) circular dependency - * fix Bug #5725: PHP5 warnings need improvement - * fix Bug #5789: small typo - * fix Bug #5810: internet should not be contacted on install if dependencies are installed - </notes> - </release> - <release> - <version>1.4.4</version> - <date>2005-11-04</date> - <license>PHP License</license> - <state>stable</state> - <notes> - * fix Bug #5865: doesn't work with PHP4.2.x - </notes> - </release> - <release> - <version>1.4.5</version> - <date>2005-11-21</date> - <license>PHP License</license> - <state>stable</state> - <notes> - * REALLY fix Bug #5865: doesn't work with PHP4.2.x - * fix Bug #5854: if no installconditions match, no error is raised - * fix Bug #5945: installer should auto-skip to the next channel on timeout - * fix Bug #5947: Some package-info not handled by PEAR_PackageFile_v2 - * fix Bug #5948: Minor typo in PEAR_Validate - * fix Bug #5958: strange error on mistyping - * fix Bug #5959: patch: pear makerpm produces RPMs that do not uninstall/upgrade cleanly - </notes> - </release> - <release> - <version>1.4.6</version> - <date>2006-01-06</date> - <license>PHP License</license> - <state>stable</state> - <notes> - Minor bugfix release - * fix problem with -options when using CGI version of PHP - * fix Critical Bug #5999: support for baseinstalldir broken in package2.xml format - * fix Bug #6034: date format bug - * fix Bug #6040: PEAR_Frontend#setFrontendClass has no docblock; - PEAR_Frontend not documented - * fix Bug #6044: PEAR_REST::retrieveCacheFirst doesn't return error codes - * fix Bug #6047: pear makerpm fails to handle docs in root directory - * fix Bug #6048: PEAR_Frontend::log parameters are wrong - * fix Bug #6106: Notices by list-upgrades (caused by time-outs ?) - * fix Bug #6145: Can't install PEAR with INSTALL_ROOT environment - * fix Bug #6218: the "pear" command does nothing - * fix Bug #6269: System::which() returns silliness if passed null - * fix Bug #6322: Installer fails to follow redirects [patch by Bertrand Gugger] - * fix Request #6119: Add PEAR_Frontend_Gtk2 support to PEAR - </notes> - </release> - <release> - <version>1.4.7</version> - <date>2006-02-27</date> - <license>PHP License</license> - <state>stable</state> - <notes> - Minor bugfix release - * Prevent packaging of release candidate releases with versions like 1.0.0rc1 - version_compare() only understands upper-case 1.0.0RC1 - * implement CLEAN section in .phpt tests - * implement run-tests command for phpunit-based tests - * implement Request #6039: setFrontendObject needed to allow objects passed - * fix Bug #6075: unnecessary validation of maintainers can break PEAR_PFM - * fix Bug #6076: optional is not set for conversion of package2.xml to "has" rel - * fix Bug #6077: PEAR_PackageFile_Parser_v2 should return by reference - * fix Bug #6273: pear download-all fails - * fix Bug #6383: incomplete PEAR::Error message on addReplacement() - * fix Bug #6445: PEAR::registerShutdownFunc doesn't work in static calls - * fix Bug #6480: pear install --installroot option fails for pecl packages [timj] - * fix Bug #6510: status active of a maintainer cannot be change - * fix Bug #6537: wrong export compatible v1 dependencies list with exclude limit - * fix Bug #6559: pear should ignore safemode/open_basedir - * fix Bug #6576: PFM2 run in trouble with sessions - * fix Bug #6579: PFM2 changelog and license with uri - * fix Bug #6673: pear install --offline --packagingroot=/blah does not work - * fix Bug #6674: --packagingroot always uses channel pear.php.net configuration - * fix Bug #6675: postinstallscript validation fails - * fix Bug #6690: channel with / will not allow upgrade - * fix Bug #6692: Optional feature install message needs channel name - * fix Bug #6716: "pear install -r" errors after install when - attempting "pear list <pkgname>" - * fix Bug #6735: PEAR_PackageFile::fromTgzFile doesn't work with package.xml - not in root dir - </notes> - </release> - <release> - <version>1.4.8</version> - <date>2006-03-05</date> - <license>PHP License</license> - <state>stable</state> - <notes> - CRITICAL BUGFIX RELEASE - - Channels with "-" in their name were suddenly invalid, and - caused crashes in many places due to improper error handling - * fix Bug #6960: channels are not allowed to have "-" in their name - * fix critical Bug #6969: PEAR list-upgrades crashes - * fix Bug #6991: Class 'PEAR_PackageFile_v1' not found in Registry.php at line 1657 - * fix Bug #7008: PEAR_Frontend::setFrontendObject doesn't set the object - * fix Bug #7015: install a package.tgz with unknown channel, fatal error in PEAR/Registry.php - * fix Bug #7020: tests/PEAR_Registry/api1_1/test_getChannelValidator.phpt crashes PEAR - </notes> - </release> - <release> - <version>1.4.9</version> - <date>2006-03-29</date> - <license>PHP License</license> - <state>stable</state> - <notes> - CRITICAL BUGFIX RELEASE - users upgrading from PEAR 1.3.x cannot upgrade to 1.4.8 - users who use --packagingroot may find that installation fails - * fix Bug #7093: if pear channel does not exist, it cannot be retrieved - * fix Bug #7165: warnings in pear - * fix Bug #7075: PEAR_PackageFile_v2 :: setLogger failed on autodetection - </notes> - </notes> - </release> - </changelog> -</package> +<?xml version="1.0" encoding="ISO-8859-1"?> +<!--DOCTYPE package SYSTEM "http://pear.php.net/dtd/package-1.0"--> +<package version="1.0" xmlns="http://pear.php.net/dtd/package-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/package-1.0 +http://pear.php.net/dtd/package-1.0.xsd"> + <name>PEAR</name> + <summary>PEAR Base System</summary> + <description>The PEAR package contains: + * the PEAR installer, for creating, distributing + and installing packages + * the beta-quality PEAR_Exception PHP5 error handling mechanism + * the beta-quality PEAR_ErrorStack advanced error handling mechanism + * the PEAR_Error error handling mechanism + * the OS_Guess class for retrieving info about the OS + where PHP is running on + * the System class for quick handling of common operations + with files and directories + * the PEAR base class + + New features in a nutshell: + * full support for channels + * pre-download dependency validation + * new package.xml 2.0 format allows tremendous flexibility while maintaining BC + * support for optional dependency groups and limited support for sub-packaging + * robust dependency support + * full dependency validation on uninstall + * remote install for hosts with only ftp access - no more problems with + restricted host installation + * full support for mirroring + * support for bundling several packages into a single tarball + * support for static dependencies on a url-based package + * support for custom file roles and installation tasks + + NOTE: users of PEAR_Frontend_Web/PEAR_Frontend_Gtk must upgrade their installations + to the latest version, or PEAR will not upgrade properly + </description> + <maintainers> + <maintainer> + <user>cellog</user> + <role>lead</role> + <name>Greg Beaver</name> + <email>cellog@php.net</email> + </maintainer> + <maintainer> + <user>ssb</user> + <role>lead</role> + <name>Stig Bakken</name> + <email>stig@php.net</email> + </maintainer> + <maintainer> + <user>cox</user> + <role>lead</role> + <name>Tomas V.V.Cox</name> + <email>cox@idecnet.com</email> + </maintainer> + <maintainer> + <user>pajoye</user> + <role>lead</role> + <name>Pierre-Alain Joye</name> + <email>pajoye@pearfr.org</email> + </maintainer> + <maintainer> + <user>timj</user> + <role>helper</role> + <name>Tim Jackson</name> + <email>timj@php.net</email> + </maintainer> + <maintainer> + <user>toggg</user> + <role>helper</role> + <name>Bertrand Gugger</name> + <email>toggg@php.net</email> + </maintainer> + <maintainer> + <user>mj</user> + <role>helper</role> + <name>Martin Jansen</name> + <email>mj@php.net</email> + </maintainer> + </maintainers> + <release> + <version>1.5.0a1</version> + <date>2006-05-01</date> + <license>PHP License</license> + <state>alpha</state> + <notes> + Minor feature addition/bugfixes + * fix Bug #6931: pear upgrade PEAR-alpha tries to upgrade to 1.4.0a12 + * fix Bug #7021: Everything must be within <dir name="/"> + * fix Bug #7196: PEAR crashes when using autoload_prepend_file + * fix Bug #7207: proxy user/pass is not urldecoded in download + * fix Bug #7219: bogus "will download PEAR 1.4.8" error + * fix Bug #7221: pear install blah-alpha won't install a newer stable + * implement Request #6614: use go-pear style dialogs in PEAR_Command_CLI by default + * implement Request #6702: implement TAP output option for run-tests command + (as defined by http://perldoc.perl.org/Test/Harness/TAP.html) + * implement Request #7090: PEAR_Downloader mustn't contact pear server + when installing local package file + </notes> + <provides type="class" name="OS_Guess"/> + <provides type="class" name="System"/> + <provides type="function" name="md5_file"/> + <deps> + <dep type="php" rel="ge" version="4.3.0"/> + <dep type="pkg" rel="ge" version="1.3.3">PEAR</dep> + <dep type="pkg" rel="ge" version="1.3.1">Archive_Tar</dep> + <dep type="pkg" rel="ge" version="1.2">Console_Getopt</dep> + <dep type="pkg" rel="ge" version="1.4.0" optional="yes">XML_RPC</dep> + <dep type="pkg" rel="ge" version="0.5.0" optional="yes">PEAR_Frontend_Web</dep> + <dep type="pkg" rel="ge" version="0.4.0" optional="yes">PEAR_Frontend_Gtk</dep> + <dep type="ext" rel="has">xml</dep> + <dep type="ext" rel="has">pcre</dep> + </deps> + <filelist> + <dir name="OS"> + <file role="php" name="Guess.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <dir name="PEAR"> + <dir name="ChannelFile"> + <file name="Parser.php" role="php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <dir name="Command"> + <file role="php" name="Auth.xml"/> + <file role="php" name="Auth.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Build.xml"/> + <file role="php" name="Build.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Channels.xml"/> + <file role="php" name="Channels.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Common.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Config.xml"/> + <file role="php" name="Config.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Install.xml"/> + <file role="php" name="Install.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Package.xml"/> + <file role="php" name="Package.php"> + <replace from="@DATA-DIR@" to="data_dir" type="pear-config"/> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Pickle.xml"/> + <file role="php" name="Pickle.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Registry.xml"/> + <file role="php" name="Registry.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Remote.xml"/> + <file role="php" name="Remote.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Mirror.xml"/> + <file role="php" name="Mirror.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Test.xml"/> + <file role="php" name="Test.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <dir name="Downloader"> + <file role="php" name="Package.php"> + <replace from="@PEAR-VER@" to="version" type="package-info"/> + </file> + </dir> + <dir name="Frontend"> + <file role="php" name="CLI.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <dir name="Installer"> + <dir name="Role"> + <file role="php" name="Common.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Data.xml"/> + <file role="php" name="Data.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Doc.xml"/> + <file role="php" name="Doc.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Ext.xml"/> + <file role="php" name="Ext.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Php.xml"/> + <file role="php" name="Php.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Script.xml"/> + <file role="php" name="Script.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Src.xml"/> + <file role="php" name="Src.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Test.xml"/> + <file role="php" name="Test.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <file role="php" name="Role.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <dir name="PackageFile"> + <dir name="Generator"> + <file role="php" name="v1.php"> + <replace from="@PEAR-VER@" to="version" type="package-info"/> + </file> + <file role="php" name="v2.php"> + <replace from="@PEAR-VER@" to="version" type="package-info"/> + </file> + </dir> + <dir name="Parser"> + <file role="php" name="v1.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="v2.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <dir name="v2"> + <file role="php" name="rw.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Validator.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <file role="php" name="v1.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="v2.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <dir name="REST"> + <file role="php" name="10.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="11.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <dir name="Task"> + <dir name="Postinstallscript"> + <file role="php" name="rw.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <dir name="Replace"> + <file role="php" name="rw.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <dir name="Unixeol"> + <file role="php" name="rw.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <dir name="Windowseol"> + <file role="php" name="rw.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <file role="php" name="Common.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Postinstallscript.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Replace.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Unixeol.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Windowseol.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <dir name="Validator"> + <file role="php" name="PECL.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <file role="php" name="Autoloader.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Builder.php"> + <replace from="@PEAR-VER@" to="version" type="package-info"/> + </file> + <file role="php" name="ChannelFile.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Command.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Common.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Config.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Dependency.php"/> + <file role="php" name="DependencyDB.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Dependency2.php"> + <replace from="@PEAR-VER@" to="version" type="package-info"/> + </file> + <file role="php" name="Downloader.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="ErrorStack.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Exception.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Frontend.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Installer.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Packager.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="PackageFile.php"> + <replace from="@PEAR-VER@" to="version" type="package-info"/> + </file> + <file role="php" name="Registry.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Remote.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="REST.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="RunTest.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Validate.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="XMLParser.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <dir name="scripts" baseinstalldir="/"> + <file role="script" install-as="pear" name="pear.sh" platform="!windows"> + <replace from="@php_bin@" to="php_bin" type="pear-config"/> + <replace from="@php_dir@" to="php_dir" type="pear-config"/> + <replace from="@pear_version@" to="version" type="package-info"/> + <replace from="@include_path@" to="php_dir" type="pear-config"/> + </file> + <file role="script" install-as="peardev" name="peardev.sh" platform="!windows"> + <replace from="@php_bin@" to="php_bin" type="pear-config"/> + <replace from="@php_dir@" to="php_dir" type="pear-config"/> + <replace from="@pear_version@" to="version" type="package-info"/> + <replace from="@include_path@" to="php_dir" type="pear-config"/> + </file> + <file role="script" install-as="pecl" name="pecl.sh" platform="!windows"> + <replace from="@php_bin@" to="php_bin" type="pear-config"/> + <replace from="@php_dir@" to="php_dir" type="pear-config"/> + <replace from="@pear_version@" to="version" type="package-info"/> + <replace from="@include_path@" to="php_dir" type="pear-config"/> + </file> + <file role="script" platform="windows" install-as="peardev.bat" name="peardev.bat"> + <replace from="@bin_dir@" to="bin_dir" type="pear-config"/> + <replace from="@php_bin@" to="php_bin" type="pear-config"/> + <replace from="@include_path@" to="php_dir" type="pear-config"/> + </file> + <file role="script" platform="windows" install-as="pear.bat" name="pear.bat"> + <replace from="@bin_dir@" to="bin_dir" type="pear-config"/> + <replace from="@php_bin@" to="php_bin" type="pear-config"/> + <replace from="@include_path@" to="php_dir" type="pear-config"/> + </file> + <file role="script" platform="windows" install-as="pecl.bat" name="pecl.bat"> + <replace from="@bin_dir@" to="bin_dir" type="pear-config"/> + <replace from="@php_bin@" to="php_bin" type="pear-config"/> + <replace from="@include_path@" to="php_dir" type="pear-config"/> + </file> + <file role="php" install-as="pearcmd.php" name="pearcmd.php"> + <replace from="@php_bin@" to="php_bin" type="pear-config"/> + <replace from="@php_dir@" to="php_dir" type="pear-config"/> + <replace from="@pear_version@" to="version" type="package-info"/> + <replace from="@include_path@" to="php_dir" type="pear-config"/> + </file> + <file role="php" install-as="peclcmd.php" name="peclcmd.php"> + <replace from="@php_bin@" to="php_bin" type="pear-config"/> + <replace from="@php_dir@" to="php_dir" type="pear-config"/> + <replace from="@pear_version@" to="version" type="package-info"/> + <replace from="@include_path@" to="php_dir" type="pear-config"/> + </file> + </dir> + <file role="data" name="package.dtd"/> + <file role="data" name="template.spec"/> + <file role="php" name="PEAR.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="System.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </filelist> + </release> + <changelog> + <release> + <version>1.4.0</version> + <date>2005-09-18</date> + <license>PHP License</license> + <state>stable</state> + <notes> + This is a major milestone release for PEAR. In addition to several killer features, + every single element of PEAR has a regression test, and so stability is much higher + than any previous PEAR release. + + New features in a nutshell: + * full support for channels + * pre-download dependency validation + * new package.xml 2.0 format allows tremendous flexibility while maintaining BC + * support for optional dependency groups and limited support for sub-packaging + * robust dependency support + * full dependency validation on uninstall + * remote install for hosts with only ftp access - no more problems with + restricted host installation + * full support for mirroring + * support for bundling several packages into a single tarball + * support for static dependencies on a url-based package + * support for custom file roles and installation tasks + + NOTE: users of PEAR_Frontend_Web/PEAR_Frontend_Gtk must upgrade their installations + to the latest version, or PEAR will not upgrade properly + </notes> + </release> + <release> + <version>1.4.1</version> + <date>2005-09-25</date> + <license>PHP License</license> + <state>stable</state> + <notes> + Major bugfix release. This is a recommended download for ALL PEAR users + + UPGRADING FROM 1.4.0 WILL CAUSE A SERIES OF NOTICES. IGNORE THEM. + THIS IS CAUSED BY A BUG IN 1.4.0 THAT IS FIXED IN 1.4.1 + + * fix prompt processing in post-install scripts + * make dual package.xml equivalency stricter when using package.xml/package2.xml + * fix critical error in validating bogus php dependencies of package.xml 1.0 + This error has existed for every PEAR version, and allows dependencies like: + <dep type="php" rel="has">4.3.0</dep> to + slip through unnoticed + * re-enable php-const replacements + * PEAR_PackageFile_v2::getConfigureOptions() was missing!! + * fix cvsdiff command + * fix xml encoding issues finally + * clean up package.xml 1.0 dir/file parsing + * fix invalid PEAR_Config generation + * change the user agent from PHP/phpversion to PEAR/pearversion/PHP/phpversion + * don't use a bogus uri for licenses on running convert command + * add "pickle" command for PECL packaging + * add validation warning if the release date in package.xml is not today when packaging + * implement progress bar for list-all/remote-list + * fix Bug #5323: pear search returns odd version numbers + * fix Bug #5428: pear cvstag package2.xml does not include the package.xml + * fix Bug #5449: pear makerpm completely broken for package.xml 2.0 + * fix Bug #5462: raiseError method does not return by ref anymore + * fix Bug #5465: pear install --offline fails to display error + * fix Bug #5477: Bug in Downloader.php and Dependency2.php + * fix Bug #5481: "pear install PECLextension" should display warning to use pecl command + * fix Bug #5482: installation of PECL packages should say add extensions to php.ini + * fix Bug #5483: pecl uninstall crack fatal error + * fix Bug #5487: PECL: compiled files are not uninstalled via the uninstall command + * fix Bug #5488: pecl uninstall package fails if package has a package.xml 1.0 + * fix Bug #5501: the commands list mentions XML-RPC + * fix Bug #5509: addDependecyGroup does not validate group name + * fix Bug #5513: PEAR 1.4 does not install non-pear.php.net packages + </notes> + </release> + <release> + <version>1.4.2</version> + <date>2005-10-08</date> + <license>PHP License</license> + <state>stable</state> + <notes> + Minor bugfix release + + * fix issues with API for adding tasks to package2.xml + * fix Bug #5520: pecl pickle fails on pecl pickle fails on extension/package deps + * fix Bug #5523: pecl pickle misses to put configureoptions into package.xml v1 + * fix Bug #5527: No need for cpp + * fix Bug #5529: configure options in package.xml 2.0 will be ignored + * fix Bug #5530: PEAR_PackageFile_v2->getConfigureOptions() API incompatible with v1 + * fix Bug #5531: adding of installconditions/binarypackage/configure options + to extsrc may fail + * fix Bug #5550: PHP notices/warnings/errors are 1 file off in trace + * fix Bug #5580: pear makerpm XML_sql2xml-0.3.2.tgz error + * fix Bug #5619: pear makerpm produces invalid .spec dependancy code + * fix Bug #5629: pear install http_download dies with bad error message + </notes> + </release> + <release> + <version>1.4.3</version> + <date>2005-11-03</date> + <license>PHP License</license> + <state>stable</state> + <notes> + MINOR SECURITY FIX release + + A security vulnerability has been discovered in all + PEAR versions (1.0 to 1.4.2). This vulnerability has been fixed, + and this is a recommended upgrade for all users. + + Run "pear channel-update" after upgrading for exponentially + faster list-all/remote-list!! + + * fix installation of files named like ".test" + * fix base class for writeable unixeol/windowseol classes + * fix running of post-install scripts with empty or no paramgroup + in CLI frontend + * fix validation of <postinstallscript> + * fix writeable PEAR_Task_Postinstallscript_rw class + * fix error in REST-based search command if searching through description + as well + * silence warning on list-upgrades/upgrade-all if no releases exist at a channel + * add checks for updated channel.xml in all remote commands + * fix pecl script if safe_mode is enabled by default + * implement SERIOUS improvement in list-all/remote-list speed. From 6 minutes + down to about 16-30 seconds + * implement --loose option to avoid recommended version validation + * implement Request #5527: alternative approach to determining glibc version + * fix Bug #5717: analyzeSourceCode() fails to process certain + quote situations properly + * fix Bug #5736: if registry can't lock registry or open filemap, + checkFileMap(), no error + * fix Bug #5676: pear config-create broken + * fix Bug #5683: Deadlock with (almost) circular dependency + * fix Bug #5725: PHP5 warnings need improvement + * fix Bug #5789: small typo + * fix Bug #5810: internet should not be contacted on install if dependencies are installed + </notes> + </release> + <release> + <version>1.4.4</version> + <date>2005-11-04</date> + <license>PHP License</license> + <state>stable</state> + <notes> + * fix Bug #5865: doesn't work with PHP4.2.x + </notes> + </release> + <release> + <version>1.4.5</version> + <date>2005-11-21</date> + <license>PHP License</license> + <state>stable</state> + <notes> + * REALLY fix Bug #5865: doesn't work with PHP4.2.x + * fix Bug #5854: if no installconditions match, no error is raised + * fix Bug #5945: installer should auto-skip to the next channel on timeout + * fix Bug #5947: Some package-info not handled by PEAR_PackageFile_v2 + * fix Bug #5948: Minor typo in PEAR_Validate + * fix Bug #5958: strange error on mistyping + * fix Bug #5959: patch: pear makerpm produces RPMs that do not uninstall/upgrade cleanly + </notes> + </release> + <release> + <version>1.4.6</version> + <date>2006-01-06</date> + <license>PHP License</license> + <state>stable</state> + <notes> + Minor bugfix release + * fix problem with -options when using CGI version of PHP + * fix Critical Bug #5999: support for baseinstalldir broken in package2.xml format + * fix Bug #6034: date format bug + * fix Bug #6040: PEAR_Frontend#setFrontendClass has no docblock; + PEAR_Frontend not documented + * fix Bug #6044: PEAR_REST::retrieveCacheFirst doesn't return error codes + * fix Bug #6047: pear makerpm fails to handle docs in root directory + * fix Bug #6048: PEAR_Frontend::log parameters are wrong + * fix Bug #6106: Notices by list-upgrades (caused by time-outs ?) + * fix Bug #6145: Can't install PEAR with INSTALL_ROOT environment + * fix Bug #6218: the "pear" command does nothing + * fix Bug #6269: System::which() returns silliness if passed null + * fix Bug #6322: Installer fails to follow redirects [patch by Bertrand Gugger] + * fix Request #6119: Add PEAR_Frontend_Gtk2 support to PEAR + </notes> + </release> + <release> + <version>1.4.7</version> + <date>2006-02-27</date> + <license>PHP License</license> + <state>stable</state> + <notes> + Minor bugfix release + * Prevent packaging of release candidate releases with versions like 1.0.0rc1 + version_compare() only understands upper-case 1.0.0RC1 + * implement CLEAN section in .phpt tests + * implement run-tests command for phpunit-based tests + * implement Request #6039: setFrontendObject needed to allow objects passed + * fix Bug #6075: unnecessary validation of maintainers can break PEAR_PFM + * fix Bug #6076: optional is not set for conversion of package2.xml to "has" rel + * fix Bug #6077: PEAR_PackageFile_Parser_v2 should return by reference + * fix Bug #6273: pear download-all fails + * fix Bug #6383: incomplete PEAR::Error message on addReplacement() + * fix Bug #6445: PEAR::registerShutdownFunc doesn't work in static calls + * fix Bug #6480: pear install --installroot option fails for pecl packages [timj] + * fix Bug #6510: status active of a maintainer cannot be change + * fix Bug #6537: wrong export compatible v1 dependencies list with exclude limit + * fix Bug #6559: pear should ignore safemode/open_basedir + * fix Bug #6576: PFM2 run in trouble with sessions + * fix Bug #6579: PFM2 changelog and license with uri + * fix Bug #6673: pear install --offline --packagingroot=/blah does not work + * fix Bug #6674: --packagingroot always uses channel pear.php.net configuration + * fix Bug #6675: postinstallscript validation fails + * fix Bug #6690: channel with / will not allow upgrade + * fix Bug #6692: Optional feature install message needs channel name + * fix Bug #6716: "pear install -r" errors after install when + attempting "pear list <pkgname>" + * fix Bug #6735: PEAR_PackageFile::fromTgzFile doesn't work with package.xml + not in root dir + </notes> + </release> + <release> + <version>1.4.8</version> + <date>2006-03-05</date> + <license>PHP License</license> + <state>stable</state> + <notes> + CRITICAL BUGFIX RELEASE + + Channels with "-" in their name were suddenly invalid, and + caused crashes in many places due to improper error handling + * fix Bug #6960: channels are not allowed to have "-" in their name + * fix critical Bug #6969: PEAR list-upgrades crashes + * fix Bug #6991: Class 'PEAR_PackageFile_v1' not found in Registry.php at line 1657 + * fix Bug #7008: PEAR_Frontend::setFrontendObject doesn't set the object + * fix Bug #7015: install a package.tgz with unknown channel, fatal error in PEAR/Registry.php + * fix Bug #7020: tests/PEAR_Registry/api1_1/test_getChannelValidator.phpt crashes PEAR + </notes> + </release> + <release> + <version>1.4.9</version> + <date>2006-03-29</date> + <license>PHP License</license> + <state>stable</state> + <notes> + CRITICAL BUGFIX RELEASE + users upgrading from PEAR 1.3.x cannot upgrade to 1.4.8 + users who use --packagingroot may find that installation fails + * fix Bug #7093: if pear channel does not exist, it cannot be retrieved + * fix Bug #7165: warnings in pear + * fix Bug #7075: PEAR_PackageFile_v2 :: setLogger failed on autodetection + </notes> + </notes> + </release> + </changelog> +</package> http://cvs.php.net/viewcvs.cgi/pear-core/package2.xml?r1=1.255&r2=1.256&diff_format=u Index: pear-core/package2.xml diff -u pear-core/package2.xml:1.255 pear-core/package2.xml:1.256 --- pear-core/package2.xml:1.255 Tue Mar 28 04:56:06 2006 +++ pear-core/package2.xml Tue Mar 28 05:33:42 2006 @@ -1,843 +1,843 @@ -<?xml version="1.0" encoding="UTF-8"?> -<package version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 -http://pear.php.net/dtd/tasks-1.0.xsd -http://pear.php.net/dtd/package-2.0 -http://pear.php.net/dtd/package-2.0.xsd"> - <name>PEAR</name> - <channel>pear.php.net</channel> - <summary>PEAR Base System</summary> - <description>The PEAR package contains: - * the PEAR installer, for creating, distributing - and installing packages - * the beta-quality PEAR_Exception PHP5 error handling mechanism - * the beta-quality PEAR_ErrorStack advanced error handling mechanism - * the PEAR_Error error handling mechanism - * the OS_Guess class for retrieving info about the OS - where PHP is running on - * the System class for quick handling of common operations - with files and directories - * the PEAR base class - - New features in a nutshell: - * full support for channels - * pre-download dependency validation - * new package.xml 2.0 format allows tremendous flexibility while maintaining BC - * support for optional dependency groups and limited support for sub-packaging - * robust dependency support - * full dependency validation on uninstall - * remote install for hosts with only ftp access - no more problems with - restricted host installation - * full support for mirroring - * support for bundling several packages into a single tarball - * support for static dependencies on a url-based package - * support for custom file roles and installation tasks - - NOTE: users of PEAR_Frontend_Web/PEAR_Frontend_Gtk must upgrade their installations - to the latest version, or PEAR will not upgrade properly - </description> - <lead> - <name>Greg Beaver</name> - <user>cellog</user> - <email>cellog@php.net</email> - <active>yes</active> - </lead> - <lead> - <name>Stig Bakken</name> - <user>ssb</user> - <email>stig@php.net</email> - <active>yes</active> - </lead> - <lead> - <name>Tomas V.V.Cox</name> - <user>cox</user> - <email>cox@idecnet.com</email> - <active>yes</active> - </lead> - <lead> - <name>Pierre-Alain Joye</name> - <user>pajoye</user> - <email>pajoye@pearfr.org</email> - <active>yes</active> - </lead> - <helper> - <name>Tim Jackson</name> - <user>timj</user> - <email>timj@php.net</email> - <active>yes</active> - </helper> - <helper> - <name>Bertrand Gugger</name> - <user>toggg</user> - <email>toggg@php.net</email> - <active>yes</active> - </helper> - <helper> - <name>Martin Jansen</name> - <user>mj</user> - <email>mj@php.net</email> - <active>no</active> - </helper> - <date>2006-05-01</date> - <version> - <release>1.5.0a1</release> - <api>1.5.0</api> - </version> - <stability> - <release>alpha</release> - <api>alpha</api> - </stability> - <license uri="http://www.php.net/license">PHP License</license> - <notes> - Minor feature addition/bugfixes - * fix Bug #6931: pear upgrade PEAR-alpha tries to upgrade to 1.4.0a12 - * fix Bug #7021: Everything must be within <dir name="/"> - * fix Bug #7196: PEAR crashes when using autoload_prepend_file - * fix Bug #7207: proxy user/pass is not urldecoded in download - * fix Bug #7219: bogus "will download PEAR 1.4.8" error - * fix Bug #7221: pear install blah-alpha won't install a newer stable - * implement Request #6614: use go-pear style dialogs in PEAR_Command_CLI by default - * implement Request #6702: implement TAP output option for run-tests command - (as defined by http://perldoc.perl.org/Test/Harness/TAP.html) - * implement Request #7090: PEAR_Downloader mustn't contact pear server - when installing local package file - </notes> - <contents> - <dir name="/"> - <dir name="OS"> - <file name="Guess.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /OS --> - <dir name="PEAR"> - <dir name="ChannelFile"> - <file name="Parser.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/ChannelFile --> - <dir name="Command"> - <file name="Auth.xml" role="php"/> - <file name="Auth.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Build.xml" role="php"/> - <file name="Build.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Channels.xml" role="php"/> - <file name="Channels.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Common.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Config.xml" role="php"/> - <file name="Config.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Install.xml" role="php"/> - <file name="Install.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Mirror.xml" role="php"/> - <file name="Mirror.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Package.xml" role="php"/> - <file name="Package.php" role="php"> - <tasks:replace from="@DATA-DIR@" to="data_dir" type="pear-config" /> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Pickle.xml" role="php"/> - <file name="Pickle.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Registry.xml" role="php"/> - <file name="Registry.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Remote.xml" role="php"/> - <file name="Remote.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Test.xml" role="php"/> - <file name="Test.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/Command --> - <dir name="Downloader"> - <file name="Package.php" role="php"> - <tasks:replace from="@PEAR-VER@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/Downloader --> - <dir name="Frontend"> - <file name="CLI.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/Frontend --> - <dir name="Installer"> - <dir name="Role"> - <file name="Common.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Data.xml" role="php"/> - <file name="Data.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Doc.xml" role="php"/> - <file name="Doc.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Ext.xml" role="php"/> - <file name="Ext.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Php.xml" role="php"/> - <file name="Php.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Script.xml" role="php"/> - <file name="Script.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Src.xml" role="php"/> - <file name="Src.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Test.xml" role="php"/> - <file name="Test.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/Installer/Role --> - <file name="Role.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/Installer --> - <dir name="PackageFile"> - <dir name="Generator"> - <file name="v1.php" role="php"> - <tasks:replace from="@PEAR-VER@" to="version" type="package-info" /> - </file> - <file name="v2.php" role="php"> - <tasks:replace from="@PEAR-VER@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/PackageFile/Generator --> - <dir name="Parser"> - <file name="v1.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="v2.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/PackageFile/Parser --> - <dir name="v2"> - <file role="php" name="rw.php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file role="php" name="Validator.php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/PackageFile/v2 --> - <file name="v1.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="v2.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/PackageFile --> - <dir name="REST"> - <file name="10.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="11.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/REST --> - <dir name="Task"> - <dir name="Postinstallscript"> - <file name="rw.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/Task/Postinstallscript --> - <dir name="Replace"> - <file name="rw.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/Task/Replace --> - <dir name="Unixeol"> - <file name="rw.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/Task/Unixeol --> - <dir name="Windowseol"> - <file name="rw.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/Task/Windowseol --> - <file name="Common.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Postinstallscript.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Replace.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Unixeol.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Windowseol.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/Task --> - <dir name="Validator"> - <file name="PECL.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/Validator --> - <file name="Autoloader.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Builder.php" role="php"> - <tasks:replace from="@PEAR-VER@" to="version" type="package-info"/> - </file> - <file name="ChannelFile.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Command.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Common.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Config.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Dependency.php" role="php" /> - <file name="DependencyDB.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Dependency2.php" role="php"> - <tasks:replace from="@PEAR-VER@" to="version" type="package-info"/> - </file> - <file name="Downloader.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="ErrorStack.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Exception.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Frontend.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Installer.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="PackageFile.php" role="php"> - <tasks:replace from="@PEAR-VER@" to="version" type="package-info" /> - </file> - <file name="Packager.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Registry.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Remote.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="REST.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="RunTest.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Validate.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="XMLParser.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR --> - <dir name="scripts" baseinstalldir="/"> - <file name="pear.bat" role="script"> - <tasks:replace from="@bin_dir@" to="bin_dir" type="pear-config" /> - <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> - <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> - <tasks:windowseol/> - </file> - <file name="peardev.bat" role="script"> - <tasks:replace from="@bin_dir@" to="bin_dir" type="pear-config" /> - <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> - <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> - <tasks:windowseol/> - </file> - <file name="pecl.bat" role="script"> - <tasks:replace from="@bin_dir@" to="bin_dir" type="pear-config" /> - <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> - <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> - <tasks:windowseol/> - </file> - <file name="pear.sh" role="script"> - <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> - <tasks:replace from="@php_dir@" to="php_dir" type="pear-config" /> - <tasks:replace from="@pear_version@" to="version" type="package-info" /> - <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> - <tasks:unixeol/> - </file> - <file name="peardev.sh" role="script"> - <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> - <tasks:replace from="@php_dir@" to="php_dir" type="pear-config" /> - <tasks:replace from="@pear_version@" to="version" type="package-info" /> - <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> - <tasks:unixeol/> - </file> - <file name="pecl.sh" role="script"> - <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> - <tasks:replace from="@php_dir@" to="php_dir" type="pear-config" /> - <tasks:replace from="@pear_version@" to="version" type="package-info" /> - <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> - <tasks:unixeol/> - </file> - <file name="pearcmd.php" role="php"> - <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> - <tasks:replace from="@php_dir@" to="php_dir" type="pear-config" /> - <tasks:replace from="@pear_version@" to="version" type="package-info" /> - <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> - </file> - <file name="peclcmd.php" role="php"> - <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> - <tasks:replace from="@php_dir@" to="php_dir" type="pear-config" /> - <tasks:replace from="@pear_version@" to="version" type="package-info" /> - <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> - </file> - </dir> <!-- /scripts --> - <file name="package.dtd" role="data" /> - <file name="PEAR.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="System.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="template.spec" role="data" /> - </dir> <!-- / --> - </contents> - <dependencies> - <required> - <php> - <min>4.3.0</min> - </php> - <pearinstaller> - <min>1.4.3</min> - </pearinstaller> - <package> - <name>Archive_Tar</name> - <channel>pear.php.net</channel> - <min>1.1</min> - <recommended>1.3.1</recommended> - <exclude>1.3.0</exclude> - </package> - <package> - <name>Console_Getopt</name> - <channel>pear.php.net</channel> - <min>1.2</min> - <recommended>1.2</recommended> - </package> - <package> - <name>PEAR_Frontend_Web</name> - <channel>pear.php.net</channel> - <max>0.5.0</max> - <exclude>0.5.0</exclude> - <conflicts/> - </package> - <package> - <name>PEAR_Frontend_Gtk</name> - <channel>pear.php.net</channel> - <max>0.4.0</max> - <exclude>0.4.0</exclude> - <conflicts/> - </package> - <extension> - <name>xml</name> - </extension> - <extension> - <name>pcre</name> - </extension> - </required> - <optional> - <package> - <name>XML_RPC</name> - <channel>pear.php.net</channel> - <min>1.4.0</min> - </package> - </optional> -<!-- <group name="remoteinstall" hint="adds the ability to install packages to a remote ftp server"> - <subpackage> - <name>PEAR_RemoteInstaller</name> - <channel>pear.php.net</channel> - <min>0.1.0</min> - <recommended>0.1.0</recommended> - </subpackage> - </group> --> - <group name="webinstaller" hint="PEAR's web-based installer"> - <package> - <name>PEAR_Frontend_Web</name> - <channel>pear.php.net</channel> - <min>0.5.0</min> - </package> - </group> - <group name="gtkinstaller" hint="PEAR's PHP-GTK-based installer"> - <package> - <name>PEAR_Frontend_Gtk</name> - <channel>pear.php.net</channel> - <min>0.4.0</min> - </package> - </group> - <group name="gtk2installer" hint="PEAR's PHP-GTK2-based installer"> - <package> - <name>PEAR_Frontend_Gtk2</name> - <channel>pear.php.net</channel> - </package> - </group> - </dependencies> - <phprelease> - <installconditions> - <os> - <name>windows</name> - </os> - </installconditions> - <filelist> - <install as="pear.bat" name="scripts/pear.bat" /> - <install as="peardev.bat" name="scripts/peardev.bat" /> - <install as="pecl.bat" name="scripts/pecl.bat" /> - <install as="pearcmd.php" name="scripts/pearcmd.php" /> - <install as="peclcmd.php" name="scripts/peclcmd.php" /> - <ignore name="scripts/peardev.sh" /> - <ignore name="scripts/pear.sh" /> - <ignore name="scripts/pecl.sh" /> - </filelist> - </phprelease> - <phprelease> - <filelist> - <install as="pear" name="scripts/pear.sh" /> - <install as="peardev" name="scripts/peardev.sh" /> - <install as="pecl" name="scripts/pecl.sh" /> - <install as="pearcmd.php" name="scripts/pearcmd.php" /> - <install as="peclcmd.php" name="scripts/peclcmd.php" /> - <ignore name="scripts/pear.bat" /> - <ignore name="scripts/peardev.bat" /> - <ignore name="scripts/pecl.bat" /> - </filelist> - </phprelease> - <changelog> - <release> - <version> - <release>1.4.0</release> - <api>1.4.0</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2005-09-18</date> - <license uri="http://www.php.net/license/3_0.txt">PHP License</license> - <notes> - This is a major milestone release for PEAR. In addition to several killer features, - every single element of PEAR has a regression test, and so stability is much higher - than any previous PEAR release. - - New features in a nutshell: - * full support for channels - * pre-download dependency validation - * new package.xml 2.0 format allows tremendous flexibility while maintaining BC - * support for optional dependency groups and limited support for sub-packaging - * robust dependency support - * full dependency validation on uninstall - * remote install for hosts with only ftp access - no more problems with - restricted host installation [through PEAR_RemoteInstaller package] - * full support for mirroring - * support for bundling several packages into a single tarball - * support for static dependencies on a uri-based package - * support for custom file roles and installation tasks - - NOTE: users of PEAR_Frontend_Web/PEAR_Frontend_Gtk must upgrade their installations - to the latest version, or PEAR will not upgrade properly - </notes> - </release> - <release> - <version> - <release>1.4.1</release> - <api>1.4.0</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2005-09-25</date> - <license uri="http://www.php.net/license/3_0.txt">PHP License</license> - <notes> - Major bugfix release. This is a recommended download for ALL PEAR users - - UPGRADING FROM 1.4.0 WILL CAUSE A SERIES OF NOTICES. IGNORE THEM. - THIS IS CAUSED BY A BUG IN 1.4.0 THAT IS FIXED IN 1.4.1 - - * fix prompt processing in post-install scripts - * make dual package.xml equivalency stricter when using package.xml/package2.xml - * fix critical error in validating bogus php dependencies of package.xml 1.0 - This error has existed for every PEAR version, and allows dependencies like: - <dep type="php" rel="has">4.3.0</dep> to - slip through unnoticed - * re-enable php-const replacements - * PEAR_PackageFile_v2::getConfigureOptions() was missing!! - * fix cvsdiff command - * fix xml encoding issues finally - * clean up package.xml 1.0 dir/file parsing - * fix invalid PEAR_Config generation - * change the user agent from PHP/phpversion to PEAR/pearversion/PHP/phpversion - * don't use a bogus uri for licenses on running convert command - * add "pickle" command for PECL packaging - * add validation warning if the release date in package.xml is not today when packaging - * implement progress bar for list-all/remote-list - * fix Bug #5323: pear search returns odd version numbers - * fix Bug #5428: pear cvstag package2.xml does not include the package.xml - * fix Bug #5449: pear makerpm completely broken for package.xml 2.0 - * fix Bug #5462: raiseError method does not return by ref anymore - * fix Bug #5465: pear install --offline fails to display error - * fix Bug #5477: Bug in Downloader.php and Dependency2.php - * fix Bug #5481: "pear install PECLextension" should display warning to use pecl command - * fix Bug #5482: installation of PECL packages should say add extensions to php.ini - * fix Bug #5483: pecl uninstall crack fatal error - * fix Bug #5487: PECL: compiled files are not uninstalled via the uninstall command - * fix Bug #5488: pecl uninstall package fails if package has a package.xml 1.0 - * fix Bug #5501: the commands list mentions XML-RPC - * fix Bug #5509: addDependecyGroup does not validate group name - * fix Bug #5513: PEAR 1.4 does not install non-pear.php.net packages - </notes> - </release> - <release> - <version> - <release>1.4.2</release> - <api>1.4.0</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2005-10-08</date> - <license uri="http://www.php.net/license/3_0.txt">PHP License</license> - <notes> - Minor bugfix release - - * fix issues with API for adding tasks to package2.xml - * fix Bug #5520: pecl pickle fails on pecl pickle fails on extension/package deps - * fix Bug #5523: pecl pickle misses to put configureoptions into package.xml v1 - * fix Bug #5527: No need for cpp - * fix Bug #5529: configure options in package.xml 2.0 will be ignored - * fix Bug #5530: PEAR_PackageFile_v2->getConfigureOptions() API incompatible with v1 - * fix Bug #5531: adding of installconditions/binarypackage/configure options - to extsrc may fail - * fix Bug #5550: PHP notices/warnings/errors are 1 file off in trace - * fix Bug #5580: pear makerpm XML_sql2xml-0.3.2.tgz error - * fix Bug #5619: pear makerpm produces invalid .spec dependancy code - * fix Bug #5629: pear install http_download dies with bad error message - </notes> - </release> - <release> - <version> - <release>1.4.3</release> - <api>1.4.1</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2005-11-03</date> - <license uri="http://www.php.net/license/3_0.txt">PHP License</license> - <notes> - MINOR SECURITY FIX release - - A security vulnerability has been discovered in all - PEAR versions (1.0 to 1.4.2). This vulnerability has been fixed, - and this is a recommended upgrade for all users. - - Run "pear channel-update" after upgrading for exponentially - faster list-all/remote-list!! - - * fix installation of files named like ".test" - * fix base class for writeable unixeol/windowseol classes - * fix running of post-install scripts with empty or no paramgroup - in CLI frontend - * fix validation of <postinstallscript> - * fix writeable PEAR_Task_Postinstallscript_rw class - * fix error in REST-based search command if searching through description - as well - * silence warning on list-upgrades/upgrade-all if no releases exist at a channel - * add checks for updated channel.xml in all remote commands - * fix pecl script if safe_mode is enabled by default - * implement SERIOUS improvement in list-all/remote-list speed. From 6 minutes - down to about 16-30 seconds - * implement --loose option to avoid recommended version validation - * implement Request #5527: alternative approach to determining glibc version - * fix Bug #5717: analyzeSourceCode() fails to process certain - quote situations properly - * fix Bug #5736: if registry can't lock registry or open filemap, - checkFileMap(), no error - * fix Bug #5676: pear config-create broken - * fix Bug #5683: Deadlock with (almost) circular dependency - * fix Bug #5725: PHP5 warnings need improvement - * fix Bug #5789: small typo - * fix Bug #5810: internet should not be contacted on install if dependencies are installed - </notes> - </release> - <release> - <version> - <release>1.4.4</release> - <api>1.4.1</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2005-11-04</date> - <license uri="http://www.php.net/license/3_0.txt">PHP License</license> - <notes> - * fix Bug #5865: doesn't work with PHP4.2.x - </notes> - </release> - <release> - <version> - <release>1.4.5</release> - <api>1.4.1</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2005-11-21</date> - <license uri="http://www.php.net/license/3_0.txt">PHP License</license> - <notes> - * REALLY fix Bug #5865: doesn't work with PHP4.2.x - * fix Bug #5854: if no installconditions match, no error is raised - * fix Bug #5945: installer should auto-skip to the next channel on timeout - * fix Bug #5947: Some package-info not handled by PEAR_PackageFile_v2 - * fix Bug #5948: Minor typo in PEAR_Validate - * fix Bug #5958: strange error on mistyping - * fix Bug #5959: patch: pear makerpm produces RPMs that do not uninstall/upgrade cleanly - </notes> - </release> - <release> - <version> - <release>1.4.6</release> - <api>1.4.1</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2006-01-06</date> - <license uri="http://www.php.net/license/3_0.txt">PHP License</license> - <notes> - Minor bugfix release - * fix problem with -options when using CGI version of PHP - * fix Critical Bug #5999: support for baseinstalldir broken in package2.xml format - * fix Bug #6034: date format bug - * fix Bug #6040: PEAR_Frontend#setFrontendClass has no docblock; - PEAR_Frontend not documented - * fix Bug #6044: PEAR_REST::retrieveCacheFirst doesn't return error codes - * fix Bug #6047: pear makerpm fails to handle docs in root directory - * fix Bug #6048: PEAR_Frontend::log parameters are wrong - * fix Bug #6106: Notices by list-upgrades (caused by time-outs ?) - * fix Bug #6145: Can't install PEAR with INSTALL_ROOT environment - * fix Bug #6218: the "pear" command does nothing - * fix Bug #6269: System::which() returns silliness if passed null - * fix Bug #6322: Installer fails to follow redirects [patch by Bertrand Gugger] - * fix Request #6119: Add PEAR_Frontend_Gtk2 support to PEAR - </notes> - </release> - <release> - <version> - <release>1.4.7</release> - <api>1.4.1</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2006-02-27</date> - <license uri="http://www.php.net/license/3_0.txt">PHP License</license> - <notes> - Minor bugfix release - * Prevent packaging of release candidate releases with versions like 1.0.0rc1 - version_compare() only understands upper-case 1.0.0RC1 - * implement CLEAN section in .phpt tests - * implement run-tests command for phpunit-based tests - * implement Request #6039: setFrontendObject needed to allow objects passed - * fix Bug #6075: unnecessary validation of maintainers can break PEAR_PFM - * fix Bug #6076: optional is not set for conversion of package2.xml to "has" rel - * fix Bug #6077: PEAR_PackageFile_Parser_v2 should return by reference - * fix Bug #6273: pear download-all fails - * fix Bug #6383: incomplete PEAR::Error message on addReplacement() - * fix Bug #6445: PEAR::registerShutdownFunc doesn't work in static calls - * fix Bug #6480: pear install --installroot option fails for pecl packages [timj] - * fix Bug #6510: status active of a maintainer cannot be change - * fix Bug #6537: wrong export compatible v1 dependencies list with exclude limit - * fix Bug #6559: pear should ignore safemode/open_basedir - * fix Bug #6576: PFM2 run in trouble with sessions - * fix Bug #6579: PFM2 changelog and license with uri - * fix Bug #6673: pear install --offline --packagingroot=/blah does not work - * fix Bug #6674: --packagingroot always uses channel pear.php.net configuration - * fix Bug #6675: postinstallscript validation fails - * fix Bug #6690: channel with / will not allow upgrade - * fix Bug #6692: Optional feature install message needs channel name - * fix Bug #6716: "pear install -r" errors after install when - attempting "pear list <pkgname>" - * fix Bug #6735: PEAR_PackageFile::fromTgzFile doesn't work with package.xml - not in root dir - </notes> - </release> - <release> - <version> - <release>1.4.8</release> - <api>1.4.2</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2006-03-05</date> - <license uri="http://www.php.net/license/3_0.txt">PHP License</license> - <notes> - CRITICAL BUGFIX RELEASE - - Channels with "-" in their name were suddenly invalid, and - caused crashes in many places due to improper error handling - * fix Bug #6960: channels are not allowed to have "-" in their name - * fix critical Bug #6969: PEAR list-upgrades crashes - * fix Bug #6991: Class 'PEAR_PackageFile_v1' not found in Registry.php at line 1657 - * fix Bug #7008: PEAR_Frontend::setFrontendObject doesn't set the object - * fix Bug #7015: install a package.tgz with unknown channel, fatal error in PEAR/Registry.php - * fix Bug #7020: tests/PEAR_Registry/api1_1/test_getChannelValidator.phpt crashes PEAR - </notes> - </release> - <release> - <version> - <release>1.4.9</release> - <api>1.4.2</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2006-03-29</date> - <license uri="http://www.php.net/license">PHP License</license> - <notes> - CRITICAL BUGFIX RELEASE - users upgrading from PEAR 1.3.x cannot upgrade to 1.4.8 - users who use --packagingroot may find that installation fails - * fix Bug #7093: if pear channel does not exist, it cannot be retrieved - * fix Bug #7165: warnings in pear - * fix Bug #7075: PEAR_PackageFile_v2 :: setLogger failed on autodetection - </notes> - </release> - </changelog> -</package> +<?xml version="1.0" encoding="UTF-8"?> +<package version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 +http://pear.php.net/dtd/tasks-1.0.xsd +http://pear.php.net/dtd/package-2.0 +http://pear.php.net/dtd/package-2.0.xsd"> + <name>PEAR</name> + <channel>pear.php.net</channel> + <summary>PEAR Base System</summary> + <description>The PEAR package contains: + * the PEAR installer, for creating, distributing + and installing packages + * the beta-quality PEAR_Exception PHP5 error handling mechanism + * the beta-quality PEAR_ErrorStack advanced error handling mechanism + * the PEAR_Error error handling mechanism + * the OS_Guess class for retrieving info about the OS + where PHP is running on + * the System class for quick handling of common operations + with files and directories + * the PEAR base class + + New features in a nutshell: + * full support for channels + * pre-download dependency validation + * new package.xml 2.0 format allows tremendous flexibility while maintaining BC + * support for optional dependency groups and limited support for sub-packaging + * robust dependency support + * full dependency validation on uninstall + * remote install for hosts with only ftp access - no more problems with + restricted host installation + * full support for mirroring + * support for bundling several packages into a single tarball + * support for static dependencies on a url-based package + * support for custom file roles and installation tasks + + NOTE: users of PEAR_Frontend_Web/PEAR_Frontend_Gtk must upgrade their installations + to the latest version, or PEAR will not upgrade properly + </description> + <lead> + <name>Greg Beaver</name> + <user>cellog</user> + <email>cellog@php.net</email> + <active>yes</active> + </lead> + <lead> + <name>Stig Bakken</name> + <user>ssb</user> + <email>stig@php.net</email> + <active>yes</active> + </lead> + <lead> + <name>Tomas V.V.Cox</name> + <user>cox</user> + <email>cox@idecnet.com</email> + <active>yes</active> + </lead> + <lead> + <name>Pierre-Alain Joye</name> + <user>pajoye</user> + <email>pajoye@pearfr.org</email> + <active>yes</active> + </lead> + <helper> + <name>Tim Jackson</name> + <user>timj</user> + <email>timj@php.net</email> + <active>yes</active> + </helper> + <helper> + <name>Bertrand Gugger</name> + <user>toggg</user> + <email>toggg@php.net</email> + <active>yes</active> + </helper> + <helper> + <name>Martin Jansen</name> + <user>mj</user> + <email>mj@php.net</email> + <active>no</active> + </helper> + <date>2006-05-01</date> + <version> + <release>1.5.0a1</release> + <api>1.5.0</api> + </version> + <stability> + <release>alpha</release> + <api>alpha</api> + </stability> + <license uri="http://www.php.net/license">PHP License</license> + <notes> + Minor feature addition/bugfixes + * fix Bug #6931: pear upgrade PEAR-alpha tries to upgrade to 1.4.0a12 + * fix Bug #7021: Everything must be within <dir name="/"> + * fix Bug #7196: PEAR crashes when using autoload_prepend_file + * fix Bug #7207: proxy user/pass is not urldecoded in download + * fix Bug #7219: bogus "will download PEAR 1.4.8" error + * fix Bug #7221: pear install blah-alpha won't install a newer stable + * implement Request #6614: use go-pear style dialogs in PEAR_Command_CLI by default + * implement Request #6702: implement TAP output option for run-tests command + (as defined by http://perldoc.perl.org/Test/Harness/TAP.html) + * implement Request #7090: PEAR_Downloader mustn't contact pear server + when installing local package file + </notes> + <contents> + <dir name="/"> + <dir name="OS"> + <file name="Guess.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /OS --> + <dir name="PEAR"> + <dir name="ChannelFile"> + <file name="Parser.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/ChannelFile --> + <dir name="Command"> + <file name="Auth.xml" role="php"/> + <file name="Auth.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Build.xml" role="php"/> + <file name="Build.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Channels.xml" role="php"/> + <file name="Channels.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Common.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Config.xml" role="php"/> + <file name="Config.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Install.xml" role="php"/> + <file name="Install.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Mirror.xml" role="php"/> + <file name="Mirror.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Package.xml" role="php"/> + <file name="Package.php" role="php"> + <tasks:replace from="@DATA-DIR@" to="data_dir" type="pear-config" /> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Pickle.xml" role="php"/> + <file name="Pickle.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Registry.xml" role="php"/> + <file name="Registry.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Remote.xml" role="php"/> + <file name="Remote.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Test.xml" role="php"/> + <file name="Test.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/Command --> + <dir name="Downloader"> + <file name="Package.php" role="php"> + <tasks:replace from="@PEAR-VER@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/Downloader --> + <dir name="Frontend"> + <file name="CLI.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/Frontend --> + <dir name="Installer"> + <dir name="Role"> + <file name="Common.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Data.xml" role="php"/> + <file name="Data.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Doc.xml" role="php"/> + <file name="Doc.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Ext.xml" role="php"/> + <file name="Ext.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Php.xml" role="php"/> + <file name="Php.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Script.xml" role="php"/> + <file name="Script.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Src.xml" role="php"/> + <file name="Src.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Test.xml" role="php"/> + <file name="Test.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/Installer/Role --> + <file name="Role.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/Installer --> + <dir name="PackageFile"> + <dir name="Generator"> + <file name="v1.php" role="php"> + <tasks:replace from="@PEAR-VER@" to="version" type="package-info" /> + </file> + <file name="v2.php" role="php"> + <tasks:replace from="@PEAR-VER@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/PackageFile/Generator --> + <dir name="Parser"> + <file name="v1.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="v2.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/PackageFile/Parser --> + <dir name="v2"> + <file role="php" name="rw.php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file role="php" name="Validator.php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/PackageFile/v2 --> + <file name="v1.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="v2.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/PackageFile --> + <dir name="REST"> + <file name="10.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="11.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/REST --> + <dir name="Task"> + <dir name="Postinstallscript"> + <file name="rw.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/Task/Postinstallscript --> + <dir name="Replace"> + <file name="rw.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/Task/Replace --> + <dir name="Unixeol"> + <file name="rw.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/Task/Unixeol --> + <dir name="Windowseol"> + <file name="rw.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/Task/Windowseol --> + <file name="Common.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Postinstallscript.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Replace.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Unixeol.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Windowseol.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/Task --> + <dir name="Validator"> + <file name="PECL.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/Validator --> + <file name="Autoloader.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Builder.php" role="php"> + <tasks:replace from="@PEAR-VER@" to="version" type="package-info"/> + </file> + <file name="ChannelFile.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Command.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Common.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Config.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Dependency.php" role="php" /> + <file name="DependencyDB.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Dependency2.php" role="php"> + <tasks:replace from="@PEAR-VER@" to="version" type="package-info"/> + </file> + <file name="Downloader.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="ErrorStack.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Exception.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Frontend.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Installer.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="PackageFile.php" role="php"> + <tasks:replace from="@PEAR-VER@" to="version" type="package-info" /> + </file> + <file name="Packager.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Registry.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Remote.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="REST.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="RunTest.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Validate.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="XMLParser.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR --> + <dir name="scripts" baseinstalldir="/"> + <file name="pear.bat" role="script"> + <tasks:replace from="@bin_dir@" to="bin_dir" type="pear-config" /> + <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> + <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> + <tasks:windowseol/> + </file> + <file name="peardev.bat" role="script"> + <tasks:replace from="@bin_dir@" to="bin_dir" type="pear-config" /> + <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> + <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> + <tasks:windowseol/> + </file> + <file name="pecl.bat" role="script"> + <tasks:replace from="@bin_dir@" to="bin_dir" type="pear-config" /> + <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> + <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> + <tasks:windowseol/> + </file> + <file name="pear.sh" role="script"> + <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> + <tasks:replace from="@php_dir@" to="php_dir" type="pear-config" /> + <tasks:replace from="@pear_version@" to="version" type="package-info" /> + <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> + <tasks:unixeol/> + </file> + <file name="peardev.sh" role="script"> + <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> + <tasks:replace from="@php_dir@" to="php_dir" type="pear-config" /> + <tasks:replace from="@pear_version@" to="version" type="package-info" /> + <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> + <tasks:unixeol/> + </file> + <file name="pecl.sh" role="script"> + <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> + <tasks:replace from="@php_dir@" to="php_dir" type="pear-config" /> + <tasks:replace from="@pear_version@" to="version" type="package-info" /> + <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> + <tasks:unixeol/> + </file> + <file name="pearcmd.php" role="php"> + <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> + <tasks:replace from="@php_dir@" to="php_dir" type="pear-config" /> + <tasks:replace from="@pear_version@" to="version" type="package-info" /> + <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> + </file> + <file name="peclcmd.php" role="php"> + <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> + <tasks:replace from="@php_dir@" to="php_dir" type="pear-config" /> + <tasks:replace from="@pear_version@" to="version" type="package-info" /> + <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> + </file> + </dir> <!-- /scripts --> + <file name="package.dtd" role="data" /> + <file name="PEAR.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="System.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="template.spec" role="data" /> + </dir> <!-- / --> + </contents> + <dependencies> + <required> + <php> + <min>4.3.0</min> + </php> + <pearinstaller> + <min>1.4.3</min> + </pearinstaller> + <package> + <name>Archive_Tar</name> + <channel>pear.php.net</channel> + <min>1.1</min> + <recommended>1.3.1</recommended> + <exclude>1.3.0</exclude> + </package> + <package> + <name>Console_Getopt</name> + <channel>pear.php.net</channel> + <min>1.2</min> + <recommended>1.2</recommended> + </package> + <package> + <name>PEAR_Frontend_Web</name> + <channel>pear.php.net</channel> + <max>0.5.0</max> + <exclude>0.5.0</exclude> + <conflicts/> + </package> + <package> + <name>PEAR_Frontend_Gtk</name> + <channel>pear.php.net</channel> + <max>0.4.0</max> + <exclude>0.4.0</exclude> + <conflicts/> + </package> + <extension> + <name>xml</name> + </extension> + <extension> + <name>pcre</name> + </extension> + </required> + <optional> + <package> + <name>XML_RPC</name> + <channel>pear.php.net</channel> + <min>1.4.0</min> + </package> + </optional> +<!-- <group name="remoteinstall" hint="adds the ability to install packages to a remote ftp server"> + <subpackage> + <name>PEAR_RemoteInstaller</name> + <channel>pear.php.net</channel> + <min>0.1.0</min> + <recommended>0.1.0</recommended> + </subpackage> + </group> --> + <group name="webinstaller" hint="PEAR's web-based installer"> + <package> + <name>PEAR_Frontend_Web</name> + <channel>pear.php.net</channel> + <min>0.5.0</min> + </package> + </group> + <group name="gtkinstaller" hint="PEAR's PHP-GTK-based installer"> + <package> + <name>PEAR_Frontend_Gtk</name> + <channel>pear.php.net</channel> + <min>0.4.0</min> + </package> + </group> + <group name="gtk2installer" hint="PEAR's PHP-GTK2-based installer"> + <package> + <name>PEAR_Frontend_Gtk2</name> + <channel>pear.php.net</channel> + </package> + </group> + </dependencies> + <phprelease> + <installconditions> + <os> + <name>windows</name> + </os> + </installconditions> + <filelist> + <install as="pear.bat" name="scripts/pear.bat" /> + <install as="peardev.bat" name="scripts/peardev.bat" /> + <install as="pecl.bat" name="scripts/pecl.bat" /> + <install as="pearcmd.php" name="scripts/pearcmd.php" /> + <install as="peclcmd.php" name="scripts/peclcmd.php" /> + <ignore name="scripts/peardev.sh" /> + <ignore name="scripts/pear.sh" /> + <ignore name="scripts/pecl.sh" /> + </filelist> + </phprelease> + <phprelease> + <filelist> + <install as="pear" name="scripts/pear.sh" /> + <install as="peardev" name="scripts/peardev.sh" /> + <install as="pecl" name="scripts/pecl.sh" /> + <install as="pearcmd.php" name="scripts/pearcmd.php" /> + <install as="peclcmd.php" name="scripts/peclcmd.php" /> + <ignore name="scripts/pear.bat" /> + <ignore name="scripts/peardev.bat" /> + <ignore name="scripts/pecl.bat" /> + </filelist> + </phprelease> + <changelog> + <release> + <version> + <release>1.4.0</release> + <api>1.4.0</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <date>2005-09-18</date> + <license uri="http://www.php.net/license/3_0.txt">PHP License</license> + <notes> + This is a major milestone release for PEAR. In addition to several killer features, + every single element of PEAR has a regression test, and so stability is much higher + than any previous PEAR release. + + New features in a nutshell: + * full support for channels + * pre-download dependency validation + * new package.xml 2.0 format allows tremendous flexibility while maintaining BC + * support for optional dependency groups and limited support for sub-packaging + * robust dependency support + * full dependency validation on uninstall + * remote install for hosts with only ftp access - no more problems with + restricted host installation [through PEAR_RemoteInstaller package] + * full support for mirroring + * support for bundling several packages into a single tarball + * support for static dependencies on a uri-based package + * support for custom file roles and installation tasks + + NOTE: users of PEAR_Frontend_Web/PEAR_Frontend_Gtk must upgrade their installations + to the latest version, or PEAR will not upgrade properly + </notes> + </release> + <release> + <version> + <release>1.4.1</release> + <api>1.4.0</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <date>2005-09-25</date> + <license uri="http://www.php.net/license/3_0.txt">PHP License</license> + <notes> + Major bugfix release. This is a recommended download for ALL PEAR users + + UPGRADING FROM 1.4.0 WILL CAUSE A SERIES OF NOTICES. IGNORE THEM. + THIS IS CAUSED BY A BUG IN 1.4.0 THAT IS FIXED IN 1.4.1 + + * fix prompt processing in post-install scripts + * make dual package.xml equivalency stricter when using package.xml/package2.xml + * fix critical error in validating bogus php dependencies of package.xml 1.0 + This error has existed for every PEAR version, and allows dependencies like: + <dep type="php" rel="has">4.3.0</dep> to + slip through unnoticed + * re-enable php-const replacements + * PEAR_PackageFile_v2::getConfigureOptions() was missing!! + * fix cvsdiff command + * fix xml encoding issues finally + * clean up package.xml 1.0 dir/file parsing + * fix invalid PEAR_Config generation + * change the user agent from PHP/phpversion to PEAR/pearversion/PHP/phpversion + * don't use a bogus uri for licenses on running convert command + * add "pickle" command for PECL packaging + * add validation warning if the release date in package.xml is not today when packaging + * implement progress bar for list-all/remote-list + * fix Bug #5323: pear search returns odd version numbers + * fix Bug #5428: pear cvstag package2.xml does not include the package.xml + * fix Bug #5449: pear makerpm completely broken for package.xml 2.0 + * fix Bug #5462: raiseError method does not return by ref anymore + * fix Bug #5465: pear install --offline fails to display error + * fix Bug #5477: Bug in Downloader.php and Dependency2.php + * fix Bug #5481: "pear install PECLextension" should display warning to use pecl command + * fix Bug #5482: installation of PECL packages should say add extensions to php.ini + * fix Bug #5483: pecl uninstall crack fatal error + * fix Bug #5487: PECL: compiled files are not uninstalled via the uninstall command + * fix Bug #5488: pecl uninstall package fails if package has a package.xml 1.0 + * fix Bug #5501: the commands list mentions XML-RPC + * fix Bug #5509: addDependecyGroup does not validate group name + * fix Bug #5513: PEAR 1.4 does not install non-pear.php.net packages + </notes> + </release> + <release> + <version> + <release>1.4.2</release> + <api>1.4.0</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <date>2005-10-08</date> + <license uri="http://www.php.net/license/3_0.txt">PHP License</license> + <notes> + Minor bugfix release + + * fix issues with API for adding tasks to package2.xml + * fix Bug #5520: pecl pickle fails on pecl pickle fails on extension/package deps + * fix Bug #5523: pecl pickle misses to put configureoptions into package.xml v1 + * fix Bug #5527: No need for cpp + * fix Bug #5529: configure options in package.xml 2.0 will be ignored + * fix Bug #5530: PEAR_PackageFile_v2->getConfigureOptions() API incompatible with v1 + * fix Bug #5531: adding of installconditions/binarypackage/configure options + to extsrc may fail + * fix Bug #5550: PHP notices/warnings/errors are 1 file off in trace + * fix Bug #5580: pear makerpm XML_sql2xml-0.3.2.tgz error + * fix Bug #5619: pear makerpm produces invalid .spec dependancy code + * fix Bug #5629: pear install http_download dies with bad error message + </notes> + </release> + <release> + <version> + <release>1.4.3</release> + <api>1.4.1</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <date>2005-11-03</date> + <license uri="http://www.php.net/license/3_0.txt">PHP License</license> + <notes> + MINOR SECURITY FIX release + + A security vulnerability has been discovered in all + PEAR versions (1.0 to 1.4.2). This vulnerability has been fixed, + and this is a recommended upgrade for all users. + + Run "pear channel-update" after upgrading for exponentially + faster list-all/remote-list!! + + * fix installation of files named like ".test" + * fix base class for writeable unixeol/windowseol classes + * fix running of post-install scripts with empty or no paramgroup + in CLI frontend + * fix validation of <postinstallscript> + * fix writeable PEAR_Task_Postinstallscript_rw class + * fix error in REST-based search command if searching through description + as well + * silence warning on list-upgrades/upgrade-all if no releases exist at a channel + * add checks for updated channel.xml in all remote commands + * fix pecl script if safe_mode is enabled by default + * implement SERIOUS improvement in list-all/remote-list speed. From 6 minutes + down to about 16-30 seconds + * implement --loose option to avoid recommended version validation + * implement Request #5527: alternative approach to determining glibc version + * fix Bug #5717: analyzeSourceCode() fails to process certain + quote situations properly + * fix Bug #5736: if registry can't lock registry or open filemap, + checkFileMap(), no error + * fix Bug #5676: pear config-create broken + * fix Bug #5683: Deadlock with (almost) circular dependency + * fix Bug #5725: PHP5 warnings need improvement + * fix Bug #5789: small typo + * fix Bug #5810: internet should not be contacted on install if dependencies are installed + </notes> + </release> + <release> + <version> + <release>1.4.4</release> + <api>1.4.1</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <date>2005-11-04</date> + <license uri="http://www.php.net/license/3_0.txt">PHP License</license> + <notes> + * fix Bug #5865: doesn't work with PHP4.2.x + </notes> + </release> + <release> + <version> + <release>1.4.5</release> + <api>1.4.1</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <date>2005-11-21</date> + <license uri="http://www.php.net/license/3_0.txt">PHP License</license> + <notes> + * REALLY fix Bug #5865: doesn't work with PHP4.2.x + * fix Bug #5854: if no installconditions match, no error is raised + * fix Bug #5945: installer should auto-skip to the next channel on timeout + * fix Bug #5947: Some package-info not handled by PEAR_PackageFile_v2 + * fix Bug #5948: Minor typo in PEAR_Validate + * fix Bug #5958: strange error on mistyping + * fix Bug #5959: patch: pear makerpm produces RPMs that do not uninstall/upgrade cleanly + </notes> + </release> + <release> + <version> + <release>1.4.6</release> + <api>1.4.1</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <date>2006-01-06</date> + <license uri="http://www.php.net/license/3_0.txt">PHP License</license> + <notes> + Minor bugfix release + * fix problem with -options when using CGI version of PHP + * fix Critical Bug #5999: support for baseinstalldir broken in package2.xml format + * fix Bug #6034: date format bug + * fix Bug #6040: PEAR_Frontend#setFrontendClass has no docblock; + PEAR_Frontend not documented + * fix Bug #6044: PEAR_REST::retrieveCacheFirst doesn't return error codes + * fix Bug #6047: pear makerpm fails to handle docs in root directory + * fix Bug #6048: PEAR_Frontend::log parameters are wrong + * fix Bug #6106: Notices by list-upgrades (caused by time-outs ?) + * fix Bug #6145: Can't install PEAR with INSTALL_ROOT environment + * fix Bug #6218: the "pear" command does nothing + * fix Bug #6269: System::which() returns silliness if passed null + * fix Bug #6322: Installer fails to follow redirects [patch by Bertrand Gugger] + * fix Request #6119: Add PEAR_Frontend_Gtk2 support to PEAR + </notes> + </release> + <release> + <version> + <release>1.4.7</release> + <api>1.4.1</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <date>2006-02-27</date> + <license uri="http://www.php.net/license/3_0.txt">PHP License</license> + <notes> + Minor bugfix release + * Prevent packaging of release candidate releases with versions like 1.0.0rc1 + version_compare() only understands upper-case 1.0.0RC1 + * implement CLEAN section in .phpt tests + * implement run-tests command for phpunit-based tests + * implement Request #6039: setFrontendObject needed to allow objects passed + * fix Bug #6075: unnecessary validation of maintainers can break PEAR_PFM + * fix Bug #6076: optional is not set for conversion of package2.xml to "has" rel + * fix Bug #6077: PEAR_PackageFile_Parser_v2 should return by reference + * fix Bug #6273: pear download-all fails + * fix Bug #6383: incomplete PEAR::Error message on addReplacement() + * fix Bug #6445: PEAR::registerShutdownFunc doesn't work in static calls + * fix Bug #6480: pear install --installroot option fails for pecl packages [timj] + * fix Bug #6510: status active of a maintainer cannot be change + * fix Bug #6537: wrong export compatible v1 dependencies list with exclude limit + * fix Bug #6559: pear should ignore safemode/open_basedir + * fix Bug #6576: PFM2 run in trouble with sessions + * fix Bug #6579: PFM2 changelog and license with uri + * fix Bug #6673: pear install --offline --packagingroot=/blah does not work + * fix Bug #6674: --packagingroot always uses channel pear.php.net configuration + * fix Bug #6675: postinstallscript validation fails + * fix Bug #6690: channel with / will not allow upgrade + * fix Bug #6692: Optional feature install message needs channel name + * fix Bug #6716: "pear install -r" errors after install when + attempting "pear list <pkgname>" + * fix Bug #6735: PEAR_PackageFile::fromTgzFile doesn't work with package.xml + not in root dir + </notes> + </release> + <release> + <version> + <release>1.4.8</release> + <api>1.4.2</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <date>2006-03-05</date> + <license uri="http://www.php.net/license/3_0.txt">PHP License</license> + <notes> + CRITICAL BUGFIX RELEASE + + Channels with "-" in their name were suddenly invalid, and + caused crashes in many places due to improper error handling + * fix Bug #6960: channels are not allowed to have "-" in their name + * fix critical Bug #6969: PEAR list-upgrades crashes + * fix Bug #6991: Class 'PEAR_PackageFile_v1' not found in Registry.php at line 1657 + * fix Bug #7008: PEAR_Frontend::setFrontendObject doesn't set the object + * fix Bug #7015: install a package.tgz with unknown channel, fatal error in PEAR/Registry.php + * fix Bug #7020: tests/PEAR_Registry/api1_1/test_getChannelValidator.phpt crashes PEAR + </notes> + </release> + <release> + <version> + <release>1.4.9</release> + <api>1.4.2</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <date>2006-03-29</date> + <license uri="http://www.php.net/license">PHP License</license> + <notes> + CRITICAL BUGFIX RELEASE + users upgrading from PEAR 1.3.x cannot upgrade to 1.4.8 + users who use --packagingroot may find that installation fails + * fix Bug #7093: if pear channel does not exist, it cannot be retrieved + * fix Bug #7165: warnings in pear + * fix Bug #7075: PEAR_PackageFile_v2 :: setLogger failed on autodetection + </notes> + </release> + </changelog> +</package> http://cvs.php.net/viewcvs.cgi/pear-core/PEAR/RunTest.php?r1=1.22&r2=1.23&diff_format=u Index: pear-core/PEAR/RunTest.php diff -u pear-core/PEAR/RunTest.php:1.22 pear-core/PEAR/RunTest.php:1.23 --- pear-core/PEAR/RunTest.php:1.22 Tue Mar 28 04:56:06 2006 +++ pear-core/PEAR/RunTest.php Tue Mar 28 05:33:42 2006 @@ -1,447 +1,447 @@ -<?php -/** - * PEAR_RunTest - * - * PHP versions 4 and 5 - * - * LICENSE: This source file is subject to version 3.0 of the PHP license - * that is available through the world-wide-web at the following URI: - * http://www.php.net/license/3_0.txt. If you did not receive a copy of - * the PHP License and are unable to obtain it through the web, please - * send a note to license@php.net so we can mail you a copy immediately. - * - * @category pear - * @package PEAR - * @author Tomas V.V.Cox <cox@idecnet.com> - * @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: RunTest.php,v 1.22 2006/03/28 04:56:06 cellog Exp $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.3.3 - */ - -/** - * for error handling - */ -require_once 'PEAR.php'; -require_once 'PEAR/Config.php'; - -define('DETAILED', 1); -putenv("PHP_PEAR_RUNTESTS=1"); - -/** - * Simplified version of PHP's test suite - * - * Try it with: - * - * $ php -r 'include "../PEAR/RunTest.php"; $t=new PEAR_RunTest; $o=$t->run("./pear_system.phpt");print_r($o);' - * - * - * @category pear - * @package PEAR - * @author Tomas V.V.Cox <cox@idecnet.com> - * @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 Release: @package_version@ - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.3.3 - */ -class PEAR_RunTest -{ - var $_logger; - var $_options; - - /** - * An object that supports the PEAR_Common->log() signature, or null - * @param PEAR_Common|null - */ - 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; - } - - // - // Run an individual test case. - // - - function run($file, $ini_settings = '') - { - $cwd = getcwd(); - $conf = &PEAR_Config::singleton(); - $php = $conf->get('php_bin'); - if (isset($this->_options['phpunit'])) { - $cmd = "$php$ini_settings -f $file"; - if (isset($this->_logger)) { - $this->_logger->log(2, 'Running command "' . $cmd . '"'); - } - - $savedir = getcwd(); // in case the test moves us around - chdir(dirname($file)); - echo `$cmd`; - chdir($savedir); - return 'PASSED'; // we have no way of knowing this information so assume passing - } - //var_dump($php);exit; - global $log_format, $info_params, $ini_overwrites; - - $info_params = ''; - $log_format = 'LEOD'; - - // Load the sections of the test file. - $section_text = array( - 'TEST' => '(unnamed test)', - 'SKIPIF' => '', - 'GET' => '', - 'ARGS' => '', - 'CLEAN' => '', - ); - - $file = realpath($file); - if (!is_file($file) || !$fp = fopen($file, "r")) { - return PEAR::raiseError("Cannot open test file: $file"); - } - - $section = ''; - while (!feof($fp)) { - $line = fgets($fp); - - // Match the beginning of a section. - if (ereg('^--([A-Z]+)--',$line,$r)) { - $section = $r[1]; - $section_text[$section] = ''; - continue; - } elseif (empty($section)) { - fclose($fp); - return PEAR::raiseError("Invalid sections formats in test file: $file"); - } - - // Add to the section text. - $section_text[$section] .= $line; - } - fclose($fp); - - $shortname = str_replace($cwd . DIRECTORY_SEPARATOR, '', $file); - if (!isset($this->_options['simple'])) { - $tested = trim($section_text['TEST']) . "[$shortname]"; - } else { - $tested = trim($section_text['TEST']) . ' '; - } - - $tmp = realpath(dirname($file)); - $tmp_skipif = $tmp . uniqid('/phpt.'); - $tmp_file = ereg_replace('\.phpt$','.php',$file); - $tmp_post = $tmp . uniqid('/phpt.'); - - if (file_exists($tmp_skipif)) { - unlink($tmp_skipif); - } - if (file_exists($tmp_file)) { - unlink($tmp_file); - } - if (file_exists($tmp_post)) { - unlink($tmp_post); - } - - // unlink old test results - if (file_exists(ereg_replace('\.phpt$','.diff',$file))) { - unlink(ereg_replace('\.phpt$','.diff',$file)); - } - if (file_exists(ereg_replace('\.phpt$','.log',$file))) { - unlink(ereg_replace('\.phpt$','.log',$file)); - } - if (file_exists(ereg_replace('\.phpt$','.exp',$file))) { - unlink(ereg_replace('\.phpt$','.exp',$file)); - } - if (file_exists(ereg_replace('\.phpt$','.out',$file))) { - unlink(ereg_replace('\.phpt$','.out',$file)); - } - - // Check if test should be skipped. - $info = ''; - $warn = false; - if (array_key_exists('SKIPIF', $section_text)) { - if (trim($section_text['SKIPIF'])) { - $this->save_text($tmp_skipif, $section_text['SKIPIF']); - //$extra = substr(PHP_OS, 0, 3) !== "WIN" ? - // "unset REQUEST_METHOD;": ""; - - //$output = `$extra $php $info_params -f $tmp_skipif`; - $output = `$php $info_params -f $tmp_skipif`; - unlink($tmp_skipif); - if (eregi("^skip", trim($output))) { - $skipreason = "SKIP $tested"; - $reason = (eregi("^skip[[:space:]]*(.+)\$", trim($output))) ? eregi_replace("^skip[[:space:]]*(.+)\$", "\\1", trim($output)) : FALSE; - if ($reason) { - $skipreason .= " (reason: $reason)"; - } - if (!isset($this->_options['quiet'])) { - $this->_logger->log(0, $skipreason); - } - if (isset($old_php)) { - $php = $old_php; - } - if (isset($this->_options['tapoutput'])) { - return array('ok', ' # skip ' . $reason); - } - return 'SKIPPED'; - } - if (eregi("^info", trim($output))) { - $reason = (ereg("^info[[:space:]]*(.+)\$", trim($output))) ? ereg_replace("^info[[:space:]]*(.+)\$", "\\1", trim($output)) : FALSE; - if ($reason) { - $info = " (info: $reason)"; - } - } - if (eregi("^warn", trim($output))) { - $reason = (ereg("^warn[[:space:]]*(.+)\$", trim($output))) ? ereg_replace("^warn[[:space:]]*(.+)\$", "\\1", trim($output)) : FALSE; - if ($reason) { - $warn = true; /* only if there is a reason */ - $info = " (warn: $reason)"; - } - } - } - } - - // We've satisfied the preconditions - run the test! - $this->save_text($tmp_file,$section_text['FILE']); - - $args = $section_text['ARGS'] ? ' -- '.$section_text['ARGS'] : ''; - - $cmd = "$php$ini_settings -f $tmp_file$args 2>&1"; - if (isset($this->_logger)) { - $this->_logger->log(2, 'Running command "' . $cmd . '"'); - } - - $savedir = getcwd(); // in case the test moves us around - if (isset($section_text['RETURNS'])) { - ob_start(); - system($cmd, $return_value); - $out = ob_get_contents(); - ob_end_clean(); - if (file_exists($tmp_post)) { - unlink($tmp_post); - } - $section_text['RETURNS'] = (int) trim($section_text['RETURNS']); - $returnfail = ($return_value != $section_text['RETURNS']); - } else { - $out = `$cmd`; - $returnfail = false; - } - chdir($savedir); - - if ($section_text['CLEAN']) { - // perform test cleanup - $this->save_text($clean = $tmp . uniqid('/phpt.'), $section_text['CLEAN']); - `$php $clean`; - if (file_exists($clean)) { - unlink($clean); - } - } - // Does the output match what is expected? - $output = trim($out); - $output = preg_replace('/\r\n/', "\n", $output); - - if (isset($section_text['EXPECTF']) || isset($section_text['EXPECTREGEX'])) { - if (isset($section_text['EXPECTF'])) { - $wanted = trim($section_text['EXPECTF']); - } else { - $wanted = trim($section_text['EXPECTREGEX']); - } - $wanted_re = preg_replace('/\r\n/',"\n",$wanted); - if (isset($section_text['EXPECTF'])) { - $wanted_re = preg_quote($wanted_re, '/'); - // Stick to basics - $wanted_re = str_replace("%s", ".+?", $wanted_re); //not greedy - $wanted_re = str_replace("%i", "[+\-]?[0-9]+", $wanted_re); - $wanted_re = str_replace("%d", "[0-9]+", $wanted_re); - $wanted_re = str_replace("%x", "[0-9a-fA-F]+", $wanted_re); - $wanted_re = str_replace("%f", "[+\-]?\.?[0-9]+\.?[0-9]*(E-?[0-9]+)?", $wanted_re); - $wanted_re = str_replace("%c", ".", $wanted_re); - // %f allows two points "-.0.0" but that is the best *simple* expression - } - /* DEBUG YOUR REGEX HERE - var_dump($wanted_re); - print(str_repeat('=', 80) . "\n"); - var_dump($output); - */ - if (!$returnfail && preg_match("/^$wanted_re\$/s", $output)) { - if (file_exists($tmp_file)) { - unlink($tmp_file); - } - if (!isset($this->_options['quiet'])) { - $this->_logger->log(0, "PASS $tested$info"); - } - if (isset($old_php)) { - $php = $old_php; - } - if (isset($this->_options['tapoutput'])) { - return array('ok', ' - ' . $tested); - } - return 'PASSED'; - } - - } else { - $wanted = trim($section_text['EXPECT']); - $wanted = preg_replace('/\r\n/',"\n",$wanted); - // compare and leave on success - $ok = (0 == strcmp($output,$wanted)); - if (!$returnfail && $ok) { - if (file_exists($tmp_file)) { - unlink($tmp_file); - } - if (!isset($this->_options['quiet'])) { - $this->_logger->log(0, "PASS $tested$info"); - } - if (isset($old_php)) { - $php = $old_php; - } - if (isset($this->_options['tapoutput'])) { - return array('ok', ' - ' . $tested); - } - return 'PASSED'; - } - } - - // Test failed so we need to report details. - if ($warn) { - $this->_logger->log(0, "WARN $tested$info"); - } else { - $this->_logger->log(0, "FAIL $tested$info"); - } - - if (isset($section_text['RETURNS'])) { - $GLOBALS['__PHP_FAILED_TESTS__'][] = array( - 'name' => $file, - 'test_name' => $tested, - 'output' => ereg_replace('\.phpt$','.log', $file), - 'diff' => ereg_replace('\.phpt$','.diff', $file), - 'info' => $info, - 'return' => $return_value - ); - } else { - $GLOBALS['__PHP_FAILED_TESTS__'][] = array( - 'name' => $file, - 'test_name' => $tested, - 'output' => ereg_replace('\.phpt$','.log', $file), - 'diff' => ereg_replace('\.phpt$','.diff', $file), - 'info' => $info, - ); - } - - // write .exp - if (strpos($log_format,'E') !== FALSE) { - $logname = ereg_replace('\.phpt$','.exp',$file); - if (!$log = fopen($logname,'w')) { - return PEAR::raiseError("Cannot create test log - $logname"); - } - fwrite($log,$wanted); - fclose($log); - } - - // write .out - if (strpos($log_format,'O') !== FALSE) { - $logname = ereg_replace('\.phpt$','.out',$file); - if (!$log = fopen($logname,'w')) { - return PEAR::raiseError("Cannot create test log - $logname"); - } - fwrite($log,$output); - fclose($log); - } - - // write .diff - if (strpos($log_format,'D') !== FALSE) { - $logname = ereg_replace('\.phpt$','.diff',$file); - if (!$log = fopen($logname,'w')) { - return PEAR::raiseError("Cannot create test log - $logname"); - } - fwrite($log, $this->generate_diff($wanted, $output, - isset($section_text['RETURNS']) ? array(trim($section_text['RETURNS']), - $return_value) : null)); - fclose($log); - } - - // write .log - if (strpos($log_format,'L') !== FALSE) { - $logname = ereg_replace('\.phpt$','.log',$file); - if (!$log = fopen($logname,'w')) { - return PEAR::raiseError("Cannot create test log - $logname"); - } - fwrite($log," ----- EXPECTED OUTPUT -$wanted ----- ACTUAL OUTPUT -$output ----- FAILED -"); - if ($returnfail) { - fwrite($log," ----- EXPECTED RETURN -$section_text[RETURNS] ----- ACTUAL RETURN -$return_value -"); - } - fclose($log); - //error_report($file,$logname,$tested); - } - - if (isset($old_php)) { - $php = $old_php; - } - - if (isset($this->_options['tapoutput'])) { - $wanted = explode("\n", $wanted); - $wanted = "# Expected output:\n#\n#" . implode("\n#", $wanted); - $output = explode("\n", $output); - $output = "#\n#\n# Actual output:\n#\n#" . implode("\n#", $output); - return array($wanted . $output . 'not ok', ' - ' . $tested); - } - return $warn ? 'WARNED' : 'FAILED'; - } - - function generate_diff($wanted, $output, $return_value) - { - $w = explode("\n", $wanted); - $o = explode("\n", $output); - $w1 = array_diff_assoc($w,$o); - $o1 = array_diff_assoc($o,$w); - $w2 = array(); - $o2 = array(); - foreach($w1 as $idx => $val) $w2[sprintf("%03d<",$idx)] = sprintf("%03d- ", $idx+1).$val; - foreach($o1 as $idx => $val) $o2[sprintf("%03d>",$idx)] = sprintf("%03d+ ", $idx+1).$val; - $diff = array_merge($w2, $o2); - ksort($diff); - if ($return_value) { - $extra = "##EXPECTED: $return_value[0]\r\n##RETURNED: $return_value[1]"; - } else { - $extra = ''; - } - return implode("\r\n", $diff) . $extra; - } - - // - // Write the given text to a temporary file, and return the filename. - // - - function save_text($filename, $text) - { - if (!$fp = fopen($filename, 'w')) { - return PEAR::raiseError("Cannot open file '" . $filename . "' (save_text)"); - } - fwrite($fp,$text); - fclose($fp); - if (1 < DETAILED) echo " -FILE $filename {{{ -$text -}}} -"; - } - -} -?> +<?php +/** + * PEAR_RunTest + * + * PHP versions 4 and 5 + * + * LICENSE: This source file is subject to version 3.0 of the PHP license + * that is available through the world-wide-web at the following URI: + * http://www.php.net/license/3_0.txt. If you did not receive a copy of + * the PHP License and are unable to obtain it through the web, please + * send a note to license@php.net so we can mail you a copy immediately. + * + * @category pear + * @package PEAR + * @author Tomas V.V.Cox <cox@idecnet.com> + * @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: RunTest.php,v 1.23 2006/03/28 05:33:42 cellog Exp $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.3.3 + */ + +/** + * for error handling + */ +require_once 'PEAR.php'; +require_once 'PEAR/Config.php'; + +define('DETAILED', 1); +putenv("PHP_PEAR_RUNTESTS=1"); + +/** + * Simplified version of PHP's test suite + * + * Try it with: + * + * $ php -r 'include "../PEAR/RunTest.php"; $t=new PEAR_RunTest; $o=$t->run("./pear_system.phpt");print_r($o);' + * + * + * @category pear + * @package PEAR + * @author Tomas V.V.Cox <cox@idecnet.com> + * @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 Release: @package_version@ + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.3.3 + */ +class PEAR_RunTest +{ + var $_logger; + var $_options; + + /** + * An object that supports the PEAR_Common->log() signature, or null + * @param PEAR_Common|null + */ + 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; + } + + // + // Run an individual test case. + // + + function run($file, $ini_settings = '') + { + $cwd = getcwd(); + $conf = &PEAR_Config::singleton(); + $php = $conf->get('php_bin'); + if (isset($this->_options['phpunit'])) { + $cmd = "$php$ini_settings -f $file"; + if (isset($this->_logger)) { + $this->_logger->log(2, 'Running command "' . $cmd . '"'); + } + + $savedir = getcwd(); // in case the test moves us around + chdir(dirname($file)); + echo `$cmd`; + chdir($savedir); + return 'PASSED'; // we have no way of knowing this information so assume passing + } + //var_dump($php);exit; + global $log_format, $info_params, $ini_overwrites; + + $info_params = ''; + $log_format = 'LEOD'; + + // Load the sections of the test file. + $section_text = array( + 'TEST' => '(unnamed test)', + 'SKIPIF' => '', + 'GET' => '', + 'ARGS' => '', + 'CLEAN' => '', + ); + + $file = realpath($file); + if (!is_file($file) || !$fp = fopen($file, "r")) { + return PEAR::raiseError("Cannot open test file: $file"); + } + + $section = ''; + while (!feof($fp)) { + $line = fgets($fp); + + // Match the beginning of a section. + if (ereg('^--([A-Z]+)--',$line,$r)) { + $section = $r[1]; + $section_text[$section] = ''; + continue; + } elseif (empty($section)) { + fclose($fp); + return PEAR::raiseError("Invalid sections formats in test file: $file"); + } + + // Add to the section text. + $section_text[$section] .= $line; + } + fclose($fp); + + $shortname = str_replace($cwd . DIRECTORY_SEPARATOR, '', $file); + if (!isset($this->_options['simple'])) { + $tested = trim($section_text['TEST']) . "[$shortname]"; + } else { + $tested = trim($section_text['TEST']) . ' '; + } + + $tmp = realpath(dirname($file)); + $tmp_skipif = $tmp . uniqid('/phpt.'); + $tmp_file = ereg_replace('\.phpt$','.php',$file); + $tmp_post = $tmp . uniqid('/phpt.'); + + if (file_exists($tmp_skipif)) { + unlink($tmp_skipif); + } + if (file_exists($tmp_file)) { + unlink($tmp_file); + } + if (file_exists($tmp_post)) { + unlink($tmp_post); + } + + // unlink old test results + if (file_exists(ereg_replace('\.phpt$','.diff',$file))) { + unlink(ereg_replace('\.phpt$','.diff',$file)); + } + if (file_exists(ereg_replace('\.phpt$','.log',$file))) { + unlink(ereg_replace('\.phpt$','.log',$file)); + } + if (file_exists(ereg_replace('\.phpt$','.exp',$file))) { + unlink(ereg_replace('\.phpt$','.exp',$file)); + } + if (file_exists(ereg_replace('\.phpt$','.out',$file))) { + unlink(ereg_replace('\.phpt$','.out',$file)); + } + + // Check if test should be skipped. + $info = ''; + $warn = false; + if (array_key_exists('SKIPIF', $section_text)) { + if (trim($section_text['SKIPIF'])) { + $this->save_text($tmp_skipif, $section_text['SKIPIF']); + //$extra = substr(PHP_OS, 0, 3) !== "WIN" ? + // "unset REQUEST_METHOD;": ""; + + //$output = `$extra $php $info_params -f $tmp_skipif`; + $output = `$php $info_params -f $tmp_skipif`; + unlink($tmp_skipif); + if (eregi("^skip", trim($output))) { + $skipreason = "SKIP $tested"; + $reason = (eregi("^skip[[:space:]]*(.+)\$", trim($output))) ? eregi_replace("^skip[[:space:]]*(.+)\$", "\\1", trim($output)) : FALSE; + if ($reason) { + $skipreason .= " (reason: $reason)"; + } + if (!isset($this->_options['quiet'])) { + $this->_logger->log(0, $skipreason); + } + if (isset($old_php)) { + $php = $old_php; + } + if (isset($this->_options['tapoutput'])) { + return array('ok', ' # skip ' . $reason); + } + return 'SKIPPED'; + } + if (eregi("^info", trim($output))) { + $reason = (ereg("^info[[:space:]]*(.+)\$", trim($output))) ? ereg_replace("^info[[:space:]]*(.+)\$", "\\1", trim($output)) : FALSE; + if ($reason) { + $info = " (info: $reason)"; + } + } + if (eregi("^warn", trim($output))) { + $reason = (ereg("^warn[[:space:]]*(.+)\$", trim($output))) ? ereg_replace("^warn[[:space:]]*(.+)\$", "\\1", trim($output)) : FALSE; + if ($reason) { + $warn = true; /* only if there is a reason */ + $info = " (warn: $reason)"; + } + } + } + } + + // We've satisfied the preconditions - run the test! + $this->save_text($tmp_file,$section_text['FILE']); + + $args = $section_text['ARGS'] ? ' -- '.$section_text['ARGS'] : ''; + + $cmd = "$php$ini_settings -f $tmp_file$args 2>&1"; + if (isset($this->_logger)) { + $this->_logger->log(2, 'Running command "' . $cmd . '"'); + } + + $savedir = getcwd(); // in case the test moves us around + if (isset($section_text['RETURNS'])) { + ob_start(); + system($cmd, $return_value); + $out = ob_get_contents(); + ob_end_clean(); + if (file_exists($tmp_post)) { + unlink($tmp_post); + } + $section_text['RETURNS'] = (int) trim($section_text['RETURNS']); + $returnfail = ($return_value != $section_text['RETURNS']); + } else { + $out = `$cmd`; + $returnfail = false; + } + chdir($savedir); + + if ($section_text['CLEAN']) { + // perform test cleanup + $this->save_text($clean = $tmp . uniqid('/phpt.'), $section_text['CLEAN']); + `$php $clean`; + if (file_exists($clean)) { + unlink($clean); + } + } + // Does the output match what is expected? + $output = trim($out); + $output = preg_replace('/\r\n/', "\n", $output); + + if (isset($section_text['EXPECTF']) || isset($section_text['EXPECTREGEX'])) { + if (isset($section_text['EXPECTF'])) { + $wanted = trim($section_text['EXPECTF']); + } else { + $wanted = trim($section_text['EXPECTREGEX']); + } + $wanted_re = preg_replace('/\r\n/',"\n",$wanted); + if (isset($section_text['EXPECTF'])) { + $wanted_re = preg_quote($wanted_re, '/'); + // Stick to basics + $wanted_re = str_replace("%s", ".+?", $wanted_re); //not greedy + $wanted_re = str_replace("%i", "[+\-]?[0-9]+", $wanted_re); + $wanted_re = str_replace("%d", "[0-9]+", $wanted_re); + $wanted_re = str_replace("%x", "[0-9a-fA-F]+", $wanted_re); + $wanted_re = str_replace("%f", "[+\-]?\.?[0-9]+\.?[0-9]*(E-?[0-9]+)?", $wanted_re); + $wanted_re = str_replace("%c", ".", $wanted_re); + // %f allows two points "-.0.0" but that is the best *simple* expression + } + /* DEBUG YOUR REGEX HERE + var_dump($wanted_re); + print(str_repeat('=', 80) . "\n"); + var_dump($output); + */ + if (!$returnfail && preg_match("/^$wanted_re\$/s", $output)) { + if (file_exists($tmp_file)) { + unlink($tmp_file); + } + if (!isset($this->_options['quiet'])) { + $this->_logger->log(0, "PASS $tested$info"); + } + if (isset($old_php)) { + $php = $old_php; + } + if (isset($this->_options['tapoutput'])) { + return array('ok', ' - ' . $tested); + } + return 'PASSED'; + } + + } else { + $wanted = trim($section_text['EXPECT']); + $wanted = preg_replace('/\r\n/',"\n",$wanted); + // compare and leave on success + $ok = (0 == strcmp($output,$wanted)); + if (!$returnfail && $ok) { + if (file_exists($tmp_file)) { + unlink($tmp_file); + } + if (!isset($this->_options['quiet'])) { + $this->_logger->log(0, "PASS $tested$info"); + } + if (isset($old_php)) { + $php = $old_php; + } + if (isset($this->_options['tapoutput'])) { + return array('ok', ' - ' . $tested); + } + return 'PASSED'; + } + } + + // Test failed so we need to report details. + if ($warn) { + $this->_logger->log(0, "WARN $tested$info"); + } else { + $this->_logger->log(0, "FAIL $tested$info"); + } + + if (isset($section_text['RETURNS'])) { + $GLOBALS['__PHP_FAILED_TESTS__'][] = array( + 'name' => $file, + 'test_name' => $tested, + 'output' => ereg_replace('\.phpt$','.log', $file), + 'diff' => ereg_replace('\.phpt$','.diff', $file), + 'info' => $info, + 'return' => $return_value + ); + } else { + $GLOBALS['__PHP_FAILED_TESTS__'][] = array( + 'name' => $file, + 'test_name' => $tested, + 'output' => ereg_replace('\.phpt$','.log', $file), + 'diff' => ereg_replace('\.phpt$','.diff', $file), + 'info' => $info, + ); + } + + // write .exp + if (strpos($log_format,'E') !== FALSE) { + $logname = ereg_replace('\.phpt$','.exp',$file); + if (!$log = fopen($logname,'w')) { + return PEAR::raiseError("Cannot create test log - $logname"); + } + fwrite($log,$wanted); + fclose($log); + } + + // write .out + if (strpos($log_format,'O') !== FALSE) { + $logname = ereg_replace('\.phpt$','.out',$file); + if (!$log = fopen($logname,'w')) { + return PEAR::raiseError("Cannot create test log - $logname"); + } + fwrite($log,$output); + fclose($log); + } + + // write .diff + if (strpos($log_format,'D') !== FALSE) { + $logname = ereg_replace('\.phpt$','.diff',$file); + if (!$log = fopen($logname,'w')) { + return PEAR::raiseError("Cannot create test log - $logname"); + } + fwrite($log, $this->generate_diff($wanted, $output, + isset($section_text['RETURNS']) ? array(trim($section_text['RETURNS']), + $return_value) : null)); + fclose($log); + } + + // write .log + if (strpos($log_format,'L') !== FALSE) { + $logname = ereg_replace('\.phpt$','.log',$file); + if (!$log = fopen($logname,'w')) { + return PEAR::raiseError("Cannot create test log - $logname"); + } + fwrite($log," +---- EXPECTED OUTPUT +$wanted +---- ACTUAL OUTPUT +$output +---- FAILED +"); + if ($returnfail) { + fwrite($log," +---- EXPECTED RETURN +$section_text[RETURNS] +---- ACTUAL RETURN +$return_value +"); + } + fclose($log); + //error_report($file,$logname,$tested); + } + + if (isset($old_php)) { + $php = $old_php; + } + + if (isset($this->_options['tapoutput'])) { + $wanted = explode("\n", $wanted); + $wanted = "# Expected output:\n#\n#" . implode("\n#", $wanted); + $output = explode("\n", $output); + $output = "#\n#\n# Actual output:\n#\n#" . implode("\n#", $output); + return array($wanted . $output . 'not ok', ' - ' . $tested); + } + return $warn ? 'WARNED' : 'FAILED'; + } + + function generate_diff($wanted, $output, $return_value) + { + $w = explode("\n", $wanted); + $o = explode("\n", $output); + $w1 = array_diff_assoc($w,$o); + $o1 = array_diff_assoc($o,$w); + $w2 = array(); + $o2 = array(); + foreach($w1 as $idx => $val) $w2[sprintf("%03d<",$idx)] = sprintf("%03d- ", $idx+1).$val; + foreach($o1 as $idx => $val) $o2[sprintf("%03d>",$idx)] = sprintf("%03d+ ", $idx+1).$val; + $diff = array_merge($w2, $o2); + ksort($diff); + if ($return_value) { + $extra = "##EXPECTED: $return_value[0]\r\n##RETURNED: $return_value[1]"; + } else { + $extra = ''; + } + return implode("\r\n", $diff) . $extra; + } + + // + // Write the given text to a temporary file, and return the filename. + // + + function save_text($filename, $text) + { + if (!$fp = fopen($filename, 'w')) { + return PEAR::raiseError("Cannot open file '" . $filename . "' (save_text)"); + } + fwrite($fp,$text); + fclose($fp); + if (1 < DETAILED) echo " +FILE $filename {{{ +$text +}}} +"; + } + +} +?> http://cvs.php.net/viewcvs.cgi/pear-core/PEAR/Command/Test.php?r1=1.11&r2=1.12&diff_format=u Index: pear-core/PEAR/Command/Test.php diff -u pear-core/PEAR/Command/Test.php:1.11 pear-core/PEAR/Command/Test.php:1.12 --- pear-core/PEAR/Command/Test.php:1.11 Tue Mar 28 04:56:06 2006 +++ pear-core/PEAR/Command/Test.php Tue Mar 28 05:33:42 2006 @@ -1,303 +1,303 @@ -<?php -/** - * PEAR_Command_Test (run-tests) - * - * PHP versions 4 and 5 - * - * LICENSE: This source file is subject to version 3.0 of the PHP license - * that is available through the world-wide-web at the following URI: - * http://www.php.net/license/3_0.txt. If you did not receive a copy of - * the PHP License and are unable to obtain it through the web, please - * send a note to license@php.net so we can mail you a copy immediately. - * - * @category pear - * @package PEAR - * @author Stig Bakken <ssb@php.net> - * @author Martin Jansen <mj@php.net> - * @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: Test.php,v 1.11 2006/03/28 04:56:06 cellog Exp $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 0.1 - */ - -/** - * base class - */ -require_once 'PEAR/Command/Common.php'; - -/** - * PEAR commands for login/logout - * - * @category pear - * @package PEAR - * @author Stig Bakken <ssb@php.net> - * @author Martin Jansen <mj@php.net> - * @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 Release: @package_version@ - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 0.1 - */ - -class PEAR_Command_Test extends PEAR_Command_Common -{ - // {{{ properties - - var $commands = array( - 'run-tests' => array( - 'summary' => 'Run Regression Tests', - 'function' => 'doRunTests', - 'shortcut' => 'rt', - 'options' => array( - 'recur' => array( - 'shortopt' => 'r', - 'doc' => 'Run tests in child directories, recursively. 4 dirs deep maximum', - ), - 'ini' => array( - 'shortopt' => 'i', - 'doc' => 'actual string of settings to pass to php in format " -d setting=blah"', - 'arg' => 'SETTINGS' - ), - 'realtimelog' => array( - 'shortopt' => 'l', - 'doc' => 'Log test runs/results as they are run', - ), - 'quiet' => array( - 'shortopt' => 'q', - 'doc' => 'Only display detail for failed tests', - ), - 'simple' => array( - 'shortopt' => 's', - 'doc' => 'Display simple output for all tests', - ), - 'package' => array( - 'shortopt' => 'p', - 'doc' => 'Treat parameters as installed packages from which to run tests', - ), - 'phpunit' => array( - 'shortopt' => 'u', - 'doc' => 'Search parameters for AllTests.php, and use that to run phpunit-based tests', - ), - 'tapoutput' => array( - 'shortopt' => 't', - 'doc' => 'Output run-tests.log in TAP-compliant format', - ), - ), - 'doc' => '[testfile|dir ...] -Run regression tests with PHP\'s regression testing script (run-tests.php).', - ), - ); - - var $output; - - // }}} - // {{{ constructor - - /** - * PEAR_Command_Test constructor. - * - * @access public - */ - function PEAR_Command_Test(&$ui, &$config) - { - parent::PEAR_Command_Common($ui, $config); - } - - // }}} - // {{{ doRunTests() - - function doRunTests($command, $options, $params) - { - if (isset($options['phpunit']) && isset($options['tapoutput'])) { - return $this->raiseError('ERROR: cannot use both --phpunit and --tapoutput at the same time'); - } - 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); - $tests = array(); - if (isset($options['recur'])) { - $depth = 4; - } else { - $depth = 1; - } - if (!count($params)) { - $params[] = '.'; - } - if (isset($options['package'])) { - $oldparams = $params; - $params = array(); - $reg = &$this->config->getRegistry(); - foreach ($oldparams as $param) { - $pname = $reg->parsePackageName($param, $this->config->get('default_channel')); - if (PEAR::isError($pname)) { - return $this->raiseError($pname); - } - $package = &$reg->getPackage($pname['package'], $pname['channel']); - if (!$package) { - return PEAR::raiseError('Unknown package "' . - $reg->parsedPackageNameToString($pname) . '"'); - } - $filelist = $package->getFilelist(); - foreach ($filelist as $name => $atts) { - if (isset($atts['role']) && $atts['role'] != 'test') { - continue; - } - if (isset($options['phpunit'])) { - if (!preg_match('/AllTests\.php$/i', $name)) { - continue; - } - } else { - if (!preg_match('/\.phpt$/', $name)) { - continue; - } - } - $params[] = $atts['installed_as']; - } - } - } - foreach ($params as $p) { - if (is_dir($p)) { - if (isset($options['phpunit'])) { - $dir = System::find(array($p, '-type', 'f', - '-maxdepth', $depth, - '-name', 'AllTests.php')); - } else { - $dir = System::find(array($p, '-type', 'f', - '-maxdepth', $depth, - '-name', '*.phpt')); - } - $tests = array_merge($tests, $dir); - } else { - if (isset($options['phpunit'])) { - if (!preg_match('/AllTests\.php$/i', $p)) { - continue; - } - $tests[] = $p; - } else { - if (!file_exists($p)) { - if (!preg_match('/\.phpt$/', $p)) { - $p .= '.phpt'; - } - $dir = System::find(array(dirname($p), '-type', 'f', - '-maxdepth', $depth, - '-name', $p)); - $tests = array_merge($tests, $dir); - } else { - $tests[] = $p; - } - } - } - } - $ini_settings = ''; - if (isset($options['ini'])) { - $ini_settings .= $options['ini']; - } - if (isset($_ENV['TEST_PHP_INCLUDE_PATH'])) { - $ini_settings .= " -d include_path={$_ENV['TEST_PHP_INCLUDE_PATH']}"; - } - if ($ini_settings) { - $this->ui->outputData('Using INI settings: "' . $ini_settings . '"'); - } - $skipped = $passed = $failed = array(); - $this->ui->outputData('Running ' . count($tests) . ' tests', $command); - $start = time(); - if (isset($options['realtimelog'])) { - if (file_exists('run-tests.log')) { - unlink('run-tests.log'); - } - } - if (isset($options['tapoutput'])) { - $tap = '1..' . count($tests) . "\n"; - } - $i = 1; - foreach ($tests as $t) { - if (isset($options['realtimelog'])) { - $fp = @fopen('run-tests.log', 'a'); - if ($fp) { - fwrite($fp, "Running test $t..."); - fclose($fp); - } - } - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $result = $run->run($t, $ini_settings); - PEAR::staticPopErrorHandling(); - if (PEAR::isError($result)) { - $this->ui->log(0, $result->getMessage()); - continue; - } - if (isset($options['tapoutput'])) { - $tap .= $result[0] . ' ' . $i . $result[1] . "\n"; - $i++; - continue; - } - if (isset($options['realtimelog'])) { - $fp = @fopen('run-tests.log', 'a'); - if ($fp) { - fwrite($fp, "$result\n"); - fclose($fp); - } - } - if ($result == 'FAILED') { - $failed[] = $t; - } - if ($result == 'PASSED') { - $passed[] = $t; - } - if ($result == 'SKIPPED') { - $skipped[] = $t; - } - } - $total = date('i:s', time() - $start); - if (isset($options['tapoutput'])) { - $fp = @fopen('run-tests.log', 'w'); - if ($fp) { - fwrite($fp, $tap, strlen($tap)); - fclose($fp); - $this->ui->outputData('wrote TAP-format log to "' .realpath('run-tests.log') . - '"', $command); - } - } else { - if (count($failed)) { - $output = "TOTAL TIME: $total\n"; - $output .= count($passed) . " PASSED TESTS\n"; - $output .= count($skipped) . " SKIPPED TESTS\n"; - $output .= count($failed) . " FAILED TESTS:\n"; - foreach ($failed as $failure) { - $output .= $failure . "\n"; - } - if (isset($options['realtimelog'])) { - $fp = @fopen('run-tests.log', 'a'); - } else { - $fp = @fopen('run-tests.log', 'w'); - } - if ($fp) { - fwrite($fp, $output, strlen($output)); - fclose($fp); - $this->ui->outputData('wrote log to "' . realpath('run-tests.log') . '"', $command); - } - } elseif (file_exists('run-tests.log') && !is_dir('run-tests.log')) { - @unlink('run-tests.log'); - } - } - $this->ui->outputData('TOTAL TIME: ' . $total); - $this->ui->outputData(count($passed) . ' PASSED TESTS', $command); - $this->ui->outputData(count($skipped) . ' SKIPPED TESTS', $command); - if (count($failed)) { - $this->ui->outputData(count($failed) . ' FAILED TESTS:', $command); - foreach ($failed as $failure) { - $this->ui->outputData($failure, $command); - } - } - - return true; - } - // }}} -} - -?> +<?php +/** + * PEAR_Command_Test (run-tests) + * + * PHP versions 4 and 5 + * + * LICENSE: This source file is subject to version 3.0 of the PHP license + * that is available through the world-wide-web at the following URI: + * http://www.php.net/license/3_0.txt. If you did not receive a copy of + * the PHP License and are unable to obtain it through the web, please + * send a note to license@php.net so we can mail you a copy immediately. + * + * @category pear + * @package PEAR + * @author Stig Bakken <ssb@php.net> + * @author Martin Jansen <mj@php.net> + * @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: Test.php,v 1.12 2006/03/28 05:33:42 cellog Exp $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 0.1 + */ + +/** + * base class + */ +require_once 'PEAR/Command/Common.php'; + +/** + * PEAR commands for login/logout + * + * @category pear + * @package PEAR + * @author Stig Bakken <ssb@php.net> + * @author Martin Jansen <mj@php.net> + * @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 Release: @package_version@ + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 0.1 + */ + +class PEAR_Command_Test extends PEAR_Command_Common +{ + // {{{ properties + + var $commands = array( + 'run-tests' => array( + 'summary' => 'Run Regression Tests', + 'function' => 'doRunTests', + 'shortcut' => 'rt', + 'options' => array( + 'recur' => array( + 'shortopt' => 'r', + 'doc' => 'Run tests in child directories, recursively. 4 dirs deep maximum', + ), + 'ini' => array( + 'shortopt' => 'i', + 'doc' => 'actual string of settings to pass to php in format " -d setting=blah"', + 'arg' => 'SETTINGS' + ), + 'realtimelog' => array( + 'shortopt' => 'l', + 'doc' => 'Log test runs/results as they are run', + ), + 'quiet' => array( + 'shortopt' => 'q', + 'doc' => 'Only display detail for failed tests', + ), + 'simple' => array( + 'shortopt' => 's', + 'doc' => 'Display simple output for all tests', + ), + 'package' => array( + 'shortopt' => 'p', + 'doc' => 'Treat parameters as installed packages from which to run tests', + ), + 'phpunit' => array( + 'shortopt' => 'u', + 'doc' => 'Search parameters for AllTests.php, and use that to run phpunit-based tests', + ), + 'tapoutput' => array( + 'shortopt' => 't', + 'doc' => 'Output run-tests.log in TAP-compliant format', + ), + ), + 'doc' => '[testfile|dir ...] +Run regression tests with PHP\'s regression testing script (run-tests.php).', + ), + ); + + var $output; + + // }}} + // {{{ constructor + + /** + * PEAR_Command_Test constructor. + * + * @access public + */ + function PEAR_Command_Test(&$ui, &$config) + { + parent::PEAR_Command_Common($ui, $config); + } + + // }}} + // {{{ doRunTests() + + function doRunTests($command, $options, $params) + { + if (isset($options['phpunit']) && isset($options['tapoutput'])) { + return $this->raiseError('ERROR: cannot use both --phpunit and --tapoutput at the same time'); + } + 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); + $tests = array(); + if (isset($options['recur'])) { + $depth = 4; + } else { + $depth = 1; + } + if (!count($params)) { + $params[] = '.'; + } + if (isset($options['package'])) { + $oldparams = $params; + $params = array(); + $reg = &$this->config->getRegistry(); + foreach ($oldparams as $param) { + $pname = $reg->parsePackageName($param, $this->config->get('default_channel')); + if (PEAR::isError($pname)) { + return $this->raiseError($pname); + } + $package = &$reg->getPackage($pname['package'], $pname['channel']); + if (!$package) { + return PEAR::raiseError('Unknown package "' . + $reg->parsedPackageNameToString($pname) . '"'); + } + $filelist = $package->getFilelist(); + foreach ($filelist as $name => $atts) { + if (isset($atts['role']) && $atts['role'] != 'test') { + continue; + } + if (isset($options['phpunit'])) { + if (!preg_match('/AllTests\.php$/i', $name)) { + continue; + } + } else { + if (!preg_match('/\.phpt$/', $name)) { + continue; + } + } + $params[] = $atts['installed_as']; + } + } + } + foreach ($params as $p) { + if (is_dir($p)) { + if (isset($options['phpunit'])) { + $dir = System::find(array($p, '-type', 'f', + '-maxdepth', $depth, + '-name', 'AllTests.php')); + } else { + $dir = System::find(array($p, '-type', 'f', + '-maxdepth', $depth, + '-name', '*.phpt')); + } + $tests = array_merge($tests, $dir); + } else { + if (isset($options['phpunit'])) { + if (!preg_match('/AllTests\.php$/i', $p)) { + continue; + } + $tests[] = $p; + } else { + if (!file_exists($p)) { + if (!preg_match('/\.phpt$/', $p)) { + $p .= '.phpt'; + } + $dir = System::find(array(dirname($p), '-type', 'f', + '-maxdepth', $depth, + '-name', $p)); + $tests = array_merge($tests, $dir); + } else { + $tests[] = $p; + } + } + } + } + $ini_settings = ''; + if (isset($options['ini'])) { + $ini_settings .= $options['ini']; + } + if (isset($_ENV['TEST_PHP_INCLUDE_PATH'])) { + $ini_settings .= " -d include_path={$_ENV['TEST_PHP_INCLUDE_PATH']}"; + } + if ($ini_settings) { + $this->ui->outputData('Using INI settings: "' . $ini_settings . '"'); + } + $skipped = $passed = $failed = array(); + $this->ui->outputData('Running ' . count($tests) . ' tests', $command); + $start = time(); + if (isset($options['realtimelog'])) { + if (file_exists('run-tests.log')) { + unlink('run-tests.log'); + } + } + if (isset($options['tapoutput'])) { + $tap = '1..' . count($tests) . "\n"; + } + $i = 1; + foreach ($tests as $t) { + if (isset($options['realtimelog'])) { + $fp = @fopen('run-tests.log', 'a'); + if ($fp) { + fwrite($fp, "Running test $t..."); + fclose($fp); + } + } + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $result = $run->run($t, $ini_settings); + PEAR::staticPopErrorHandling(); + if (PEAR::isError($result)) { + $this->ui->log(0, $result->getMessage()); + continue; + } + if (isset($options['tapoutput'])) { + $tap .= $result[0] . ' ' . $i . $result[1] . "\n"; + $i++; + continue; + } + if (isset($options['realtimelog'])) { + $fp = @fopen('run-tests.log', 'a'); + if ($fp) { + fwrite($fp, "$result\n"); + fclose($fp); + } + } + if ($result == 'FAILED') { + $failed[] = $t; + } + if ($result == 'PASSED') { + $passed[] = $t; + } + if ($result == 'SKIPPED') { + $skipped[] = $t; + } + } + $total = date('i:s', time() - $start); + if (isset($options['tapoutput'])) { + $fp = @fopen('run-tests.log', 'w'); + if ($fp) { + fwrite($fp, $tap, strlen($tap)); + fclose($fp); + $this->ui->outputData('wrote TAP-format log to "' .realpath('run-tests.log') . + '"', $command); + } + } else { + if (count($failed)) { + $output = "TOTAL TIME: $total\n"; + $output .= count($passed) . " PASSED TESTS\n"; + $output .= count($skipped) . " SKIPPED TESTS\n"; + $output .= count($failed) . " FAILED TESTS:\n"; + foreach ($failed as $failure) { + $output .= $failure . "\n"; + } + if (isset($options['realtimelog'])) { + $fp = @fopen('run-tests.log', 'a'); + } else { + $fp = @fopen('run-tests.log', 'w'); + } + if ($fp) { + fwrite($fp, $output, strlen($output)); + fclose($fp); + $this->ui->outputData('wrote log to "' . realpath('run-tests.log') . '"', $command); + } + } elseif (file_exists('run-tests.log') && !is_dir('run-tests.log')) { + @unlink('run-tests.log'); + } + } + $this->ui->outputData('TOTAL TIME: ' . $total); + $this->ui->outputData(count($passed) . ' PASSED TESTS', $command); + $this->ui->outputData(count($skipped) . ' SKIPPED TESTS', $command); + if (count($failed)) { + $this->ui->outputData(count($failed) . ' FAILED TESTS:', $command); + foreach ($failed as $failure) { + $this->ui->outputData($failure, $command); + } + } + + return true; + } + // }}} +} + +?> http://cvs.php.net/viewcvs.cgi/pear-core/PEAR/Command/Test.xml?r1=1.3&r2=1.4&diff_format=u Index: pear-core/PEAR/Command/Test.xml diff -u pear-core/PEAR/Command/Test.xml:1.3 pear-core/PEAR/Command/Test.xml:1.4 --- pear-core/PEAR/Command/Test.xml:1.3 Tue Mar 28 04:56:06 2006 +++ pear-core/PEAR/Command/Test.xml Tue Mar 28 05:33:42 2006 @@ -1,44 +1,44 @@ -<commands version="1.0"> - <run-tests> - <summary>Run Regression Tests</summary> - <function>doRunTests</function> - <shortcut>rt</shortcut> - <options> - <recur> - <shortopt>r</shortopt> - <doc>Run tests in child directories, recursively. 4 dirs deep maximum</doc> - </recur> - <ini> - <shortopt>i</shortopt> - <doc>actual string of settings to pass to php in format " -d setting=blah"</doc> - <arg>SETTINGS</arg> - </ini> - <realtimelog> - <shortopt>l</shortopt> - <doc>Log test runs/results as they are run</doc> - </realtimelog> - <quiet> - <shortopt>q</shortopt> - <doc>Only display detail for failed tests</doc> - </quiet> - <simple> - <shortopt>s</shortopt> - <doc>Display simple output for all tests</doc> - </simple> - <package> - <shortopt>p</shortopt> - <doc>Treat parameters as installed packages from which to run tests</doc> - </package> - <phpunit> - <shortopt>u</shortopt> - <doc>Search parameters for AllTests.php, and use that to run phpunit-based tests</doc> - </phpunit> - <tapoutput> - <shortopt>t</shortopt> - <doc>Output run-tests.log in TAP-compliant format</doc> - </tapoutput> - </options> - <doc>[testfile|dir ...] -Run regression tests with PHP's regression testing script (run-tests.php).</doc> - </run-tests> +<commands version="1.0"> + <run-tests> + <summary>Run Regression Tests</summary> + <function>doRunTests</function> + <shortcut>rt</shortcut> + <options> + <recur> + <shortopt>r</shortopt> + <doc>Run tests in child directories, recursively. 4 dirs deep maximum</doc> + </recur> + <ini> + <shortopt>i</shortopt> + <doc>actual string of settings to pass to php in format " -d setting=blah"</doc> + <arg>SETTINGS</arg> + </ini> + <realtimelog> + <shortopt>l</shortopt> + <doc>Log test runs/results as they are run</doc> + </realtimelog> + <quiet> + <shortopt>q</shortopt> + <doc>Only display detail for failed tests</doc> + </quiet> + <simple> + <shortopt>s</shortopt> + <doc>Display simple output for all tests</doc> + </simple> + <package> + <shortopt>p</shortopt> + <doc>Treat parameters as installed packages from which to run tests</doc> + </package> + <phpunit> + <shortopt>u</shortopt> + <doc>Search parameters for AllTests.php, and use that to run phpunit-based tests</doc> + </phpunit> + <tapoutput> + <shortopt>t</shortopt> + <doc>Output run-tests.log in TAP-compliant format</doc> + </tapoutput> + </options> + <doc>[testfile|dir ...] +Run regression tests with PHP's regression testing script (run-tests.php).</doc> + </run-tests> </commands> \ No newline at end of file http://cvs.php.net/viewcvs.cgi/pear-core/PEAR/Frontend/CLI.php?r1=1.61&r2=1.62&diff_format=u Index: pear-core/PEAR/Frontend/CLI.php diff -u pear-core/PEAR/Frontend/CLI.php:1.61 pear-core/PEAR/Frontend/CLI.php:1.62 --- pear-core/PEAR/Frontend/CLI.php:1.61 Tue Mar 28 04:25:51 2006 +++ pear-core/PEAR/Frontend/CLI.php Tue Mar 28 05:33:42 2006 @@ -1,754 +1,754 @@ -<?php -/** - * PEAR_Frontend_CLI - * - * PHP versions 4 and 5 - * - * LICENSE: This source file is subject to version 3.0 of the PHP license - * that is available through the world-wide-web at the following URI: - * http://www.php.net/license/3_0.txt. If you did not receive a copy of - * the PHP License and are unable to obtain it through the web, please - * send a note to license@php.net so we can mail you a copy immediately. - * - * @category pear - * @package PEAR - * @author Stig Bakken <ssb@php.net> - * @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: CLI.php,v 1.61 2006/03/28 04:25:51 cellog Exp $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 0.1 - */ -/** - * base class - */ -require_once 'PEAR/Frontend.php'; - -/** - * Command-line Frontend for the PEAR Installer - * @category pear - * @package PEAR - * @author Stig Bakken <ssb@php.net> - * @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 Release: @package_version@ - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 0.1 - */ -class PEAR_Frontend_CLI extends PEAR_Frontend -{ - // {{{ properties - - /** - * What type of user interface this frontend is for. - * @var string - * @access public - */ - var $type = 'CLI'; - var $lp = ''; // line prefix - - var $params = array(); - var $term = array( - 'bold' => '', - 'normal' => '', - ); - - // }}} - - // {{{ constructor - - function PEAR_Frontend_CLI() - { - parent::PEAR(); - $term = getenv('TERM'); //(cox) $_ENV is empty for me in 4.1.1 - if (function_exists('posix_isatty') && !posix_isatty(1)) { - // output is being redirected to a file or through a pipe - } elseif ($term) { - // XXX can use ncurses extension here, if available - if (preg_match('/^(xterm|vt220|linux)/', $term)) { - $this->term['bold'] = sprintf("%c%c%c%c", 27, 91, 49, 109); - $this->term['normal']=sprintf("%c%c%c", 27, 91, 109); - } elseif (preg_match('/^vt100/', $term)) { - $this->term['bold'] = sprintf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); - $this->term['normal']=sprintf("%c%c%c%c%c", 27, 91, 109, 0, 0); - } - } elseif (OS_WINDOWS) { - // XXX add ANSI codes here - } - } - - // }}} - - // {{{ displayLine(text) - - function displayLine($text) - { - trigger_error("PEAR_Frontend_CLI::displayLine deprecated", E_USER_ERROR); - } - - function _displayLine($text) - { - print "$this->lp$text\n"; - } - - // }}} - // {{{ display(text) - - function display($text) - { - trigger_error("PEAR_Frontend_CLI::display deprecated", E_USER_ERROR); - } - - function _display($text) - { - print $text; - } - - // }}} - // {{{ displayError(eobj) - - /** - * @param object PEAR_Error object - */ - function displayError($eobj) - { - return $this->_displayLine($eobj->getMessage()); - } - - // }}} - // {{{ displayFatalError(eobj) - - /** - * @param object PEAR_Error object - */ - function displayFatalError($eobj) - { - $this->displayError($eobj); - if (class_exists('PEAR_Config')) { - $config = &PEAR_Config::singleton(); - if ($config->get('verbose') > 5) { - if (function_exists('debug_print_backtrace')) { - debug_print_backtrace(); - } elseif (function_exists('debug_backtrace')) { - $trace = debug_backtrace(); - $raised = false; - foreach ($trace as $i => $frame) { - if (!$raised) { - if (isset($frame['class']) && strtolower($frame['class']) == - 'pear' && strtolower($frame['function']) == 'raiseerror') { - $raised = true; - } else { - continue; - } - } - if (!isset($frame['class'])) { - $frame['class'] = ''; - } - if (!isset($frame['type'])) { - $frame['type'] = ''; - } - if (!isset($frame['function'])) { - $frame['function'] = ''; - } - if (!isset($frame['line'])) { - $frame['line'] = ''; - } - $this->_displayLine("#$i: $frame[class]$frame[type]$frame[function] $frame[line]"); - } - } - } - } - exit(1); - } - - // }}} - // {{{ displayHeading(title) - - function displayHeading($title) - { - trigger_error("PEAR_Frontend_CLI::displayHeading deprecated", E_USER_ERROR); - } - - function _displayHeading($title) - { - print $this->lp.$this->bold($title)."\n"; - print $this->lp.str_repeat("=", strlen($title))."\n"; - } - - // }}} - - /** - * Instruct the runInstallScript method to skip a paramgroup that matches the - * id value passed in. - * - * This method is useful for dynamically configuring which sections of a post-install script - * will be run based on the user's setup, which is very useful for making flexible - * post-install scripts without losing the cross-Frontend ability to retrieve user input - * @param string - */ - function skipParamgroup($id) - { - $this->_skipSections[$id] = true; - } - - function runPostinstallScripts(&$scripts) - { - foreach ($scripts as $i => $script) { - $this->runInstallScript($scripts[$i]->_params, $scripts[$i]->_obj); - } - } - - /** - * @param array $xml contents of postinstallscript tag - * @param object $script post-installation script - * @param string install|upgrade - */ - function runInstallScript($xml, &$script) - { - $this->_skipSections = array(); - if (!is_array($xml) || !isset($xml['paramgroup'])) { - $script->run(array(), '_default'); - } else { - $completedPhases = array(); - if (!isset($xml['paramgroup'][0])) { - $xml['paramgroup'] = array($xml['paramgroup']); - } - foreach ($xml['paramgroup'] as $group) { - if (isset($this->_skipSections[$group['id']])) { - // the post-install script chose to skip this section dynamically - continue; - } - if (isset($group['name'])) { - $paramname = explode('::', $group['name']); - if ($lastgroup['id'] != $paramname[0]) { - continue; - } - $group['name'] = $paramname[1]; - if (isset($answers)) { - if (isset($answers[$group['name']])) { - switch ($group['conditiontype']) { - case '=' : - if ($answers[$group['name']] != $group['value']) { - continue 2; - } - break; - case '!=' : - if ($answers[$group['name']] == $group['value']) { - continue 2; - } - break; - case 'preg_match' : - if (!@preg_match('/' . $group['value'] . '/', - $answers[$group['name']])) { - continue 2; - } - break; - default : - return; - } - } - } else { - return; - } - } - $lastgroup = $group; - if (isset($group['instructions'])) { - $this->_display($group['instructions']); - } - if (!isset($group['param'][0])) { - $group['param'] = array($group['param']); - } - if (isset($group['param'])) { - if (method_exists($script, 'postProcessPrompts')) { - $prompts = $script->postProcessPrompts($group['param'], $group['id']); - if (!is_array($prompts) || count($prompts) != count($group['param'])) { - $this->outputData('postinstall', 'Error: post-install script did not ' . - 'return proper post-processed prompts'); - $prompts = $group['param']; - } else { - foreach ($prompts as $i => $var) { - if (!is_array($var) || !isset($var['prompt']) || - !isset($var['name']) || - ($var['name'] != $group['param'][$i]['name']) || - ($var['type'] != $group['param'][$i]['type'])) { - $this->outputData('postinstall', 'Error: post-install script ' . - 'modified the variables or prompts, severe security risk. ' . - 'Will instead use the defaults from the package.xml'); - $prompts = $group['param']; - } - } - } - $answers = $this->confirmDialog($prompts); - } else { - $answers = $this->confirmDialog($group['param']); - } - } - if ((isset($answers) && $answers) || !isset($group['param'])) { - if (!isset($answers)) { - $answers = array(); - } - array_unshift($completedPhases, $group['id']); - if (!$script->run($answers, $group['id'])) { - $script->run($completedPhases, '_undoOnError'); - return; - } - } else { - $script->run($completedPhases, '_undoOnError'); - return; - } - } - } - } - - /** - * Ask for user input, confirm the answers and continue until the user is satisfied - * @param array an array of arrays, format array('name' => 'paramname', 'prompt' => - * 'text to display', 'type' => 'string'[, default => 'default value']) - * @return array - */ - function confirmDialog($params) - { - $answers = array(); - $prompts = $types = array(); - foreach ($params as $param) { - $prompts[$param['name']] = $param['prompt']; - $types[$param['name']] = $param['type']; - if (isset($param['default'])) { - $answers[$param['name']] = $param['default']; - } else { - $answers[$param['name']] = ''; - } - } - $tried = false; - do { - if ($tried) { - $i = 1; - foreach ($answers as $var => $value) { - if (!strlen($value)) { - echo $this->bold("* Enter an answer for #" . $i . ": ({$prompts[$var]})\n"); - } - $i++; - } - } - $answers = $this->userDialog('', $prompts, $types, $answers); - $tried = true; - } while (is_array($answers) && count(array_filter($answers)) != count($prompts)); - return $answers; - } - // {{{ userDialog(prompt, [type], [default]) - - function userDialog($command, $prompts, $types = array(), $defaults = array(), - $screensize = 20) - { - if (!is_array($prompts)) { - return array(); - } - $testprompts = array_keys($prompts); - $result = $defaults; - if (!defined('STDIN')) { - $fp = fopen('php://stdin', 'r'); - } else { - $fp = STDIN; - } - while (true) { - $descLength = max(array_map('strlen', $prompts)); - $descFormat = "%-{$descLength}s"; - $last = count($prompts); - - $i = 0; - foreach ($prompts as $n => $var) { - printf("%2d. $descFormat : %s\n", ++$i, $prompts[$n], isset($result[$n]) ? - $result[$n] : null); - } - - print "\n1-$last, 'all', 'abort', or Enter to continue: "; - $tmp = trim(fgets($fp, 1024)); - if (empty($tmp)) { - break; - } - if ($tmp == 'abort') { - return false; - } - if (isset($testprompts[(int)$tmp - 1])) { - $var = $testprompts[(int)$tmp - 1]; - $desc = $prompts[$var]; - $current = $result[$var]; - print "$desc [$current] : "; - $result[$var] = trim(fgets($fp, 1024)); - } elseif ($tmp == 'all') { - foreach ($prompts as $var => $desc) { - $current = $result[$var]; - print "$desc [$current] : "; - $tmp = trim(fgets($fp, 1024)); - if (!empty($tmp)) { - $result[$var] = trim($tmp); - } - } - } - } - if (!defined('STDIN')) { - fclose($fp); - } - return $result; - } - - // }}} - // {{{ userConfirm(prompt, [default]) - - function userConfirm($prompt, $default = 'yes') - { - trigger_error("PEAR_Frontend_CLI::userConfirm not yet converted", E_USER_ERROR); - static $positives = array('y', 'yes', 'on', '1'); - static $negatives = array('n', 'no', 'off', '0'); - print "$this->lp$prompt [$default] : "; - $fp = fopen("php://stdin", "r"); - $line = fgets($fp, 2048); - fclose($fp); - $answer = strtolower(trim($line)); - if (empty($answer)) { - $answer = $default; - } - if (in_array($answer, $positives)) { - return true; - } - if (in_array($answer, $negatives)) { - return false; - } - if (in_array($default, $positives)) { - return true; - } - return false; - } - - // }}} - // {{{ startTable([params]) - - function startTable($params = array()) - { - trigger_error("PEAR_Frontend_CLI::startTable deprecated", E_USER_ERROR); - } - - function _startTable($params = array()) - { - $params['table_data'] = array(); - $params['widest'] = array(); // indexed by column - $params['highest'] = array(); // indexed by row - $params['ncols'] = 0; - $this->params = $params; - } - - // }}} - // {{{ tableRow(columns, [rowparams], [colparams]) - - function tableRow($columns, $rowparams = array(), $colparams = array()) - { - trigger_error("PEAR_Frontend_CLI::tableRow deprecated", E_USER_ERROR); - } - - function _tableRow($columns, $rowparams = array(), $colparams = array()) - { - $highest = 1; - for ($i = 0; $i < sizeof($columns); $i++) { - $col = &$columns[$i]; - if (isset($colparams[$i]) && !empty($colparams[$i]['wrap'])) { - $col = wordwrap($col, $colparams[$i]['wrap'], "\n", 0); - } - if (strpos($col, "\n") !== false) { - $multiline = explode("\n", $col); - $w = 0; - foreach ($multiline as $n => $line) { - if (strlen($line) > $w) { - $w = strlen($line); - } - } - $lines = sizeof($multiline); - } else { - $w = strlen($col); - } - - if (isset($this->params['widest'][$i])) { - if ($w > $this->params['widest'][$i]) { - $this->params['widest'][$i] = $w; - } - } else { - $this->params['widest'][$i] = $w; - } - $tmp = count_chars($columns[$i], 1); - // handle unix, mac and windows formats - $lines = (isset($tmp[10]) ? $tmp[10] : (isset($tmp[13]) ? $tmp[13] : 0)) + 1; - if ($lines > $highest) { - $highest = $lines; - } - } - if (sizeof($columns) > $this->params['ncols']) { - $this->params['ncols'] = sizeof($columns); - } - $new_row = array( - 'data' => $columns, - 'height' => $highest, - 'rowparams' => $rowparams, - 'colparams' => $colparams, - ); - $this->params['table_data'][] = $new_row; - } - - // }}} - // {{{ endTable() - - function endTable() - { - trigger_error("PEAR_Frontend_CLI::endTable deprecated", E_USER_ERROR); - } - - function _endTable() - { - extract($this->params); - if (!empty($caption)) { - $this->_displayHeading($caption); - } - if (count($table_data) == 0) { - return; - } - if (!isset($width)) { - $width = $widest; - } else { - for ($i = 0; $i < $ncols; $i++) { - if (!isset($width[$i])) { - $width[$i] = $widest[$i]; - } - } - } - $border = false; - if (empty($border)) { - $cellstart = ''; - $cellend = ' '; - $rowend = ''; - $padrowend = false; - $borderline = ''; - } else { - $cellstart = '| '; - $cellend = ' '; - $rowend = '|'; - $padrowend = true; - $borderline = '+'; - foreach ($width as $w) { - $borderline .= str_repeat('-', $w + strlen($cellstart) + strlen($cellend) - 1); - $borderline .= '+'; - } - } - if ($borderline) { - $this->_displayLine($borderline); - } - for ($i = 0; $i < sizeof($table_data); $i++) { - extract($table_data[$i]); - if (!is_array($rowparams)) { - $rowparams = array(); - } - if (!is_array($colparams)) { - $colparams = array(); - } - $rowlines = array(); - if ($height > 1) { - for ($c = 0; $c < sizeof($data); $c++) { - $rowlines[$c] = preg_split('/(\r?\n|\r)/', $data[$c]); - if (sizeof($rowlines[$c]) < $height) { - $rowlines[$c] = array_pad($rowlines[$c], $height, ''); - } - } - } else { - for ($c = 0; $c < sizeof($data); $c++) { - $rowlines[$c] = array($data[$c]); - } - } - for ($r = 0; $r < $height; $r++) { - $rowtext = ''; - for ($c = 0; $c < sizeof($data); $c++) { - if (isset($colparams[$c])) { - $attribs = array_merge($rowparams, $colparams); - } else { - $attribs = $rowparams; - } - $w = isset($width[$c]) ? $width[$c] : 0; - //$cell = $data[$c]; - $cell = $rowlines[$c][$r]; - $l = strlen($cell); - if ($l > $w) { - $cell = substr($cell, 0, $w); - } - if (isset($attribs['bold'])) { - $cell = $this->bold($cell); - } - if ($l < $w) { - // not using str_pad here because we may - // add bold escape characters to $cell - $cell .= str_repeat(' ', $w - $l); - } - - $rowtext .= $cellstart . $cell . $cellend; - } - if (!$border) { - $rowtext = rtrim($rowtext); - } - $rowtext .= $rowend; - $this->_displayLine($rowtext); - } - } - if ($borderline) { - $this->_displayLine($borderline); - } - } - - // }}} - // {{{ outputData() - - function outputData($data, $command = '_default') - { - switch ($command) { - case 'channel-info': - foreach ($data as $type => $section) { - if ($type == 'main') { - $section['data'] = array_values($section['data']); - } - $this->outputData($section); - } - break; - case 'install': - case 'upgrade': - case 'upgrade-all': - if (isset($data['release_warnings'])) { - $this->_displayLine(''); - $this->_startTable(array( - 'border' => false, - 'caption' => 'Release Warnings' - )); - $this->_tableRow(array($data['release_warnings']), null, array(1 => array('wrap' => 55))); - $this->_endTable(); - $this->_displayLine(''); - } - $this->_displayLine($data['data']); - break; - case 'search': - $this->_startTable($data); - if (isset($data['headline']) && is_array($data['headline'])) { - $this->_tableRow($data['headline'], array('bold' => true), array(1 => array('wrap' => 55))); - } - - foreach($data['data'] as $category) { - foreach($category as $pkg) { - $this->_tableRow($pkg, null, array(1 => array('wrap' => 55))); - } - }; - $this->_endTable(); - break; - case 'list-all': - $this->_startTable($data); - if (isset($data['headline']) && is_array($data['headline'])) { - $this->_tableRow($data['headline'], array('bold' => true), array(1 => array('wrap' => 55))); - } - - foreach($data['data'] as $category) { - foreach($category as $pkg) { - unset($pkg[4]); - unset($pkg[5]); - $this->_tableRow($pkg, null, array(1 => array('wrap' => 55))); - } - }; - $this->_endTable(); - break; - case 'config-show': - $data['border'] = false; - $opts = array(0 => array('wrap' => 30), - 1 => array('wrap' => 20), - 2 => array('wrap' => 35)); - $this->_startTable($data); - if (isset($data['headline']) && is_array($data['headline'])) { - $this->_tableRow($data['headline'], - array('bold' => true), - $opts); - } - foreach($data['data'] as $group) { - foreach($group as $value) { - if ($value[2] == '') { - $value[2] = "<not set>"; - } - $this->_tableRow($value, null, $opts); - } - } - $this->_endTable(); - break; - case 'remote-info': - $data = array( - 'caption' => 'Package details:', - 'border' => false, - 'data' => array( - array("Latest", $data['stable']), - array("Installed", $data['installed']), - array("Package", $data['name']), - array("License", $data['license']), - array("Category", $data['category']), - array("Summary", $data['summary']), - array("Description", $data['description']), - ), - ); - default: { - if (is_array($data)) { - $this->_startTable($data); - $count = count($data['data'][0]); - if ($count == 2) { - $opts = array(0 => array('wrap' => 25), - 1 => array('wrap' => 48) - ); - } elseif ($count == 3) { - $opts = array(0 => array('wrap' => 30), - 1 => array('wrap' => 20), - 2 => array('wrap' => 35) - ); - } else { - $opts = null; - } - if (isset($data['headline']) && is_array($data['headline'])) { - $this->_tableRow($data['headline'], - array('bold' => true), - $opts); - } - foreach($data['data'] as $row) { - $this->_tableRow($row, null, $opts); - } - $this->_endTable(); - } else { - $this->_displayLine($data); - } - } - } - } - - // }}} - // {{{ log(text) - - - function log($text, $append_crlf = true) - { - if ($append_crlf) { - return $this->_displayLine($text); - } - return $this->_display($text); - } - - - // }}} - // {{{ bold($text) - - function bold($text) - { - if (empty($this->term['bold'])) { - return strtoupper($text); - } - return $this->term['bold'] . $text . $this->term['normal']; - } - - // }}} -} - -?> +<?php +/** + * PEAR_Frontend_CLI + * + * PHP versions 4 and 5 + * + * LICENSE: This source file is subject to version 3.0 of the PHP license + * that is available through the world-wide-web at the following URI: + * http://www.php.net/license/3_0.txt. If you did not receive a copy of + * the PHP License and are unable to obtain it through the web, please + * send a note to license@php.net so we can mail you a copy immediately. + * + * @category pear + * @package PEAR + * @author Stig Bakken <ssb@php.net> + * @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: CLI.php,v 1.62 2006/03/28 05:33:42 cellog Exp $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 0.1 + */ +/** + * base class + */ +require_once 'PEAR/Frontend.php'; + +/** + * Command-line Frontend for the PEAR Installer + * @category pear + * @package PEAR + * @author Stig Bakken <ssb@php.net> + * @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 Release: @package_version@ + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 0.1 + */ +class PEAR_Frontend_CLI extends PEAR_Frontend +{ + // {{{ properties + + /** + * What type of user interface this frontend is for. + * @var string + * @access public + */ + var $type = 'CLI'; + var $lp = ''; // line prefix + + var $params = array(); + var $term = array( + 'bold' => '', + 'normal' => '', + ); + + // }}} + + // {{{ constructor + + function PEAR_Frontend_CLI() + { + parent::PEAR(); + $term = getenv('TERM'); //(cox) $_ENV is empty for me in 4.1.1 + if (function_exists('posix_isatty') && !posix_isatty(1)) { + // output is being redirected to a file or through a pipe + } elseif ($term) { + // XXX can use ncurses extension here, if available + if (preg_match('/^(xterm|vt220|linux)/', $term)) { + $this->term['bold'] = sprintf("%c%c%c%c", 27, 91, 49, 109); + $this->term['normal']=sprintf("%c%c%c", 27, 91, 109); + } elseif (preg_match('/^vt100/', $term)) { + $this->term['bold'] = sprintf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); + $this->term['normal']=sprintf("%c%c%c%c%c", 27, 91, 109, 0, 0); + } + } elseif (OS_WINDOWS) { + // XXX add ANSI codes here + } + } + + // }}} + + // {{{ displayLine(text) + + function displayLine($text) + { + trigger_error("PEAR_Frontend_CLI::displayLine deprecated", E_USER_ERROR); + } + + function _displayLine($text) + { + print "$this->lp$text\n"; + } + + // }}} + // {{{ display(text) + + function display($text) + { + trigger_error("PEAR_Frontend_CLI::display deprecated", E_USER_ERROR); + } + + function _display($text) + { + print $text; + } + + // }}} + // {{{ displayError(eobj) + + /** + * @param object PEAR_Error object + */ + function displayError($eobj) + { + return $this->_displayLine($eobj->getMessage()); + } + + // }}} + // {{{ displayFatalError(eobj) + + /** + * @param object PEAR_Error object + */ + function displayFatalError($eobj) + { + $this->displayError($eobj); + if (class_exists('PEAR_Config')) { + $config = &PEAR_Config::singleton(); + if ($config->get('verbose') > 5) { + if (function_exists('debug_print_backtrace')) { + debug_print_backtrace(); + } elseif (function_exists('debug_backtrace')) { + $trace = debug_backtrace(); + $raised = false; + foreach ($trace as $i => $frame) { + if (!$raised) { + if (isset($frame['class']) && strtolower($frame['class']) == + 'pear' && strtolower($frame['function']) == 'raiseerror') { + $raised = true; + } else { + continue; + } + } + if (!isset($frame['class'])) { + $frame['class'] = ''; + } + if (!isset($frame['type'])) { + $frame['type'] = ''; + } + if (!isset($frame['function'])) { + $frame['function'] = ''; + } + if (!isset($frame['line'])) { + $frame['line'] = ''; + } + $this->_displayLine("#$i: $frame[class]$frame[type]$frame[function] $frame[line]"); + } + } + } + } + exit(1); + } + + // }}} + // {{{ displayHeading(title) + + function displayHeading($title) + { + trigger_error("PEAR_Frontend_CLI::displayHeading deprecated", E_USER_ERROR); + } + + function _displayHeading($title) + { + print $this->lp.$this->bold($title)."\n"; + print $this->lp.str_repeat("=", strlen($title))."\n"; + } + + // }}} + + /** + * Instruct the runInstallScript method to skip a paramgroup that matches the + * id value passed in. + * + * This method is useful for dynamically configuring which sections of a post-install script + * will be run based on the user's setup, which is very useful for making flexible + * post-install scripts without losing the cross-Frontend ability to retrieve user input + * @param string + */ + function skipParamgroup($id) + { + $this->_skipSections[$id] = true; + } + + function runPostinstallScripts(&$scripts) + { + foreach ($scripts as $i => $script) { + $this->runInstallScript($scripts[$i]->_params, $scripts[$i]->_obj); + } + } + + /** + * @param array $xml contents of postinstallscript tag + * @param object $script post-installation script + * @param string install|upgrade + */ + function runInstallScript($xml, &$script) + { + $this->_skipSections = array(); + if (!is_array($xml) || !isset($xml['paramgroup'])) { + $script->run(array(), '_default'); + } else { + $completedPhases = array(); + if (!isset($xml['paramgroup'][0])) { + $xml['paramgroup'] = array($xml['paramgroup']); + } + foreach ($xml['paramgroup'] as $group) { + if (isset($this->_skipSections[$group['id']])) { + // the post-install script chose to skip this section dynamically + continue; + } + if (isset($group['name'])) { + $paramname = explode('::', $group['name']); + if ($lastgroup['id'] != $paramname[0]) { + continue; + } + $group['name'] = $paramname[1]; + if (isset($answers)) { + if (isset($answers[$group['name']])) { + switch ($group['conditiontype']) { + case '=' : + if ($answers[$group['name']] != $group['value']) { + continue 2; + } + break; + case '!=' : + if ($answers[$group['name']] == $group['value']) { + continue 2; + } + break; + case 'preg_match' : + if (!@preg_match('/' . $group['value'] . '/', + $answers[$group['name']])) { + continue 2; + } + break; + default : + return; + } + } + } else { + return; + } + } + $lastgroup = $group; + if (isset($group['instructions'])) { + $this->_display($group['instructions']); + } + if (!isset($group['param'][0])) { + $group['param'] = array($group['param']); + } + if (isset($group['param'])) { + if (method_exists($script, 'postProcessPrompts')) { + $prompts = $script->postProcessPrompts($group['param'], $group['id']); + if (!is_array($prompts) || count($prompts) != count($group['param'])) { + $this->outputData('postinstall', 'Error: post-install script did not ' . + 'return proper post-processed prompts'); + $prompts = $group['param']; + } else { + foreach ($prompts as $i => $var) { + if (!is_array($var) || !isset($var['prompt']) || + !isset($var['name']) || + ($var['name'] != $group['param'][$i]['name']) || + ($var['type'] != $group['param'][$i]['type'])) { + $this->outputData('postinstall', 'Error: post-install script ' . + 'modified the variables or prompts, severe security risk. ' . + 'Will instead use the defaults from the package.xml'); + $prompts = $group['param']; + } + } + } + $answers = $this->confirmDialog($prompts); + } else { + $answers = $this->confirmDialog($group['param']); + } + } + if ((isset($answers) && $answers) || !isset($group['param'])) { + if (!isset($answers)) { + $answers = array(); + } + array_unshift($completedPhases, $group['id']); + if (!$script->run($answers, $group['id'])) { + $script->run($completedPhases, '_undoOnError'); + return; + } + } else { + $script->run($completedPhases, '_undoOnError'); + return; + } + } + } + } + + /** + * Ask for user input, confirm the answers and continue until the user is satisfied + * @param array an array of arrays, format array('name' => 'paramname', 'prompt' => + * 'text to display', 'type' => 'string'[, default => 'default value']) + * @return array + */ + function confirmDialog($params) + { + $answers = array(); + $prompts = $types = array(); + foreach ($params as $param) { + $prompts[$param['name']] = $param['prompt']; + $types[$param['name']] = $param['type']; + if (isset($param['default'])) { + $answers[$param['name']] = $param['default']; + } else { + $answers[$param['name']] = ''; + } + } + $tried = false; + do { + if ($tried) { + $i = 1; + foreach ($answers as $var => $value) { + if (!strlen($value)) { + echo $this->bold("* Enter an answer for #" . $i . ": ({$prompts[$var]})\n"); + } + $i++; + } + } + $answers = $this->userDialog('', $prompts, $types, $answers); + $tried = true; + } while (is_array($answers) && count(array_filter($answers)) != count($prompts)); + return $answers; + } + // {{{ userDialog(prompt, [type], [default]) + + function userDialog($command, $prompts, $types = array(), $defaults = array(), + $screensize = 20) + { + if (!is_array($prompts)) { + return array(); + } + $testprompts = array_keys($prompts); + $result = $defaults; + if (!defined('STDIN')) { + $fp = fopen('php://stdin', 'r'); + } else { + $fp = STDIN; + } + while (true) { + $descLength = max(array_map('strlen', $prompts)); + $descFormat = "%-{$descLength}s"; + $last = count($prompts); + + $i = 0; + foreach ($prompts as $n => $var) { + printf("%2d. $descFormat : %s\n", ++$i, $prompts[$n], isset($result[$n]) ? + $result[$n] : null); + } + + print "\n1-$last, 'all', 'abort', or Enter to continue: "; + $tmp = trim(fgets($fp, 1024)); + if (empty($tmp)) { + break; + } + if ($tmp == 'abort') { + return false; + } + if (isset($testprompts[(int)$tmp - 1])) { + $var = $testprompts[(int)$tmp - 1]; + $desc = $prompts[$var]; + $current = $result[$var]; + print "$desc [$current] : "; + $result[$var] = trim(fgets($fp, 1024)); + } elseif ($tmp == 'all') { + foreach ($prompts as $var => $desc) { + $current = $result[$var]; + print "$desc [$current] : "; + $tmp = trim(fgets($fp, 1024)); + if (!empty($tmp)) { + $result[$var] = trim($tmp); + } + } + } + } + if (!defined('STDIN')) { + fclose($fp); + } + return $result; + } + + // }}} + // {{{ userConfirm(prompt, [default]) + + function userConfirm($prompt, $default = 'yes') + { + trigger_error("PEAR_Frontend_CLI::userConfirm not yet converted", E_USER_ERROR); + static $positives = array('y', 'yes', 'on', '1'); + static $negatives = array('n', 'no', 'off', '0'); + print "$this->lp$prompt [$default] : "; + $fp = fopen("php://stdin", "r"); + $line = fgets($fp, 2048); + fclose($fp); + $answer = strtolower(trim($line)); + if (empty($answer)) { + $answer = $default; + } + if (in_array($answer, $positives)) { + return true; + } + if (in_array($answer, $negatives)) { + return false; + } + if (in_array($default, $positives)) { + return true; + } + return false; + } + + // }}} + // {{{ startTable([params]) + + function startTable($params = array()) + { + trigger_error("PEAR_Frontend_CLI::startTable deprecated", E_USER_ERROR); + } + + function _startTable($params = array()) + { + $params['table_data'] = array(); + $params['widest'] = array(); // indexed by column + $params['highest'] = array(); // indexed by row + $params['ncols'] = 0; + $this->params = $params; + } + + // }}} + // {{{ tableRow(columns, [rowparams], [colparams]) + + function tableRow($columns, $rowparams = array(), $colparams = array()) + { + trigger_error("PEAR_Frontend_CLI::tableRow deprecated", E_USER_ERROR); + } + + function _tableRow($columns, $rowparams = array(), $colparams = array()) + { + $highest = 1; + for ($i = 0; $i < sizeof($columns); $i++) { + $col = &$columns[$i]; + if (isset($colparams[$i]) && !empty($colparams[$i]['wrap'])) { + $col = wordwrap($col, $colparams[$i]['wrap'], "\n", 0); + } + if (strpos($col, "\n") !== false) { + $multiline = explode("\n", $col); + $w = 0; + foreach ($multiline as $n => $line) { + if (strlen($line) > $w) { + $w = strlen($line); + } + } + $lines = sizeof($multiline); + } else { + $w = strlen($col); + } + + if (isset($this->params['widest'][$i])) { + if ($w > $this->params['widest'][$i]) { + $this->params['widest'][$i] = $w; + } + } else { + $this->params['widest'][$i] = $w; + } + $tmp = count_chars($columns[$i], 1); + // handle unix, mac and windows formats + $lines = (isset($tmp[10]) ? $tmp[10] : (isset($tmp[13]) ? $tmp[13] : 0)) + 1; + if ($lines > $highest) { + $highest = $lines; + } + } + if (sizeof($columns) > $this->params['ncols']) { + $this->params['ncols'] = sizeof($columns); + } + $new_row = array( + 'data' => $columns, + 'height' => $highest, + 'rowparams' => $rowparams, + 'colparams' => $colparams, + ); + $this->params['table_data'][] = $new_row; + } + + // }}} + // {{{ endTable() + + function endTable() + { + trigger_error("PEAR_Frontend_CLI::endTable deprecated", E_USER_ERROR); + } + + function _endTable() + { + extract($this->params); + if (!empty($caption)) { + $this->_displayHeading($caption); + } + if (count($table_data) == 0) { + return; + } + if (!isset($width)) { + $width = $widest; + } else { + for ($i = 0; $i < $ncols; $i++) { + if (!isset($width[$i])) { + $width[$i] = $widest[$i]; + } + } + } + $border = false; + if (empty($border)) { + $cellstart = ''; + $cellend = ' '; + $rowend = ''; + $padrowend = false; + $borderline = ''; + } else { + $cellstart = '| '; + $cellend = ' '; + $rowend = '|'; + $padrowend = true; + $borderline = '+'; + foreach ($width as $w) { + $borderline .= str_repeat('-', $w + strlen($cellstart) + strlen($cellend) - 1); + $borderline .= '+'; + } + } + if ($borderline) { + $this->_displayLine($borderline); + } + for ($i = 0; $i < sizeof($table_data); $i++) { + extract($table_data[$i]); + if (!is_array($rowparams)) { + $rowparams = array(); + } + if (!is_array($colparams)) { + $colparams = array(); + } + $rowlines = array(); + if ($height > 1) { + for ($c = 0; $c < sizeof($data); $c++) { + $rowlines[$c] = preg_split('/(\r?\n|\r)/', $data[$c]); + if (sizeof($rowlines[$c]) < $height) { + $rowlines[$c] = array_pad($rowlines[$c], $height, ''); + } + } + } else { + for ($c = 0; $c < sizeof($data); $c++) { + $rowlines[$c] = array($data[$c]); + } + } + for ($r = 0; $r < $height; $r++) { + $rowtext = ''; + for ($c = 0; $c < sizeof($data); $c++) { + if (isset($colparams[$c])) { + $attribs = array_merge($rowparams, $colparams); + } else { + $attribs = $rowparams; + } + $w = isset($width[$c]) ? $width[$c] : 0; + //$cell = $data[$c]; + $cell = $rowlines[$c][$r]; + $l = strlen($cell); + if ($l > $w) { + $cell = substr($cell, 0, $w); + } + if (isset($attribs['bold'])) { + $cell = $this->bold($cell); + } + if ($l < $w) { + // not using str_pad here because we may + // add bold escape characters to $cell + $cell .= str_repeat(' ', $w - $l); + } + + $rowtext .= $cellstart . $cell . $cellend; + } + if (!$border) { + $rowtext = rtrim($rowtext); + } + $rowtext .= $rowend; + $this->_displayLine($rowtext); + } + } + if ($borderline) { + $this->_displayLine($borderline); + } + } + + // }}} + // {{{ outputData() + + function outputData($data, $command = '_default') + { + switch ($command) { + case 'channel-info': + foreach ($data as $type => $section) { + if ($type == 'main') { + $section['data'] = array_values($section['data']); + } + $this->outputData($section); + } + break; + case 'install': + case 'upgrade': + case 'upgrade-all': + if (isset($data['release_warnings'])) { + $this->_displayLine(''); + $this->_startTable(array( + 'border' => false, + 'caption' => 'Release Warnings' + )); + $this->_tableRow(array($data['release_warnings']), null, array(1 => array('wrap' => 55))); + $this->_endTable(); + $this->_displayLine(''); + } + $this->_displayLine($data['data']); + break; + case 'search': + $this->_startTable($data); + if (isset($data['headline']) && is_array($data['headline'])) { + $this->_tableRow($data['headline'], array('bold' => true), array(1 => array('wrap' => 55))); + } + + foreach($data['data'] as $category) { + foreach($category as $pkg) { + $this->_tableRow($pkg, null, array(1 => array('wrap' => 55))); + } + }; + $this->_endTable(); + break; + case 'list-all': + $this->_startTable($data); + if (isset($data['headline']) && is_array($data['headline'])) { + $this->_tableRow($data['headline'], array('bold' => true), array(1 => array('wrap' => 55))); + } + + foreach($data['data'] as $category) { + foreach($category as $pkg) { + unset($pkg[4]); + unset($pkg[5]); + $this->_tableRow($pkg, null, array(1 => array('wrap' => 55))); + } + }; + $this->_endTable(); + break; + case 'config-show': + $data['border'] = false; + $opts = array(0 => array('wrap' => 30), + 1 => array('wrap' => 20), + 2 => array('wrap' => 35)); + $this->_startTable($data); + if (isset($data['headline']) && is_array($data['headline'])) { + $this->_tableRow($data['headline'], + array('bold' => true), + $opts); + } + foreach($data['data'] as $group) { + foreach($group as $value) { + if ($value[2] == '') { + $value[2] = "<not set>"; + } + $this->_tableRow($value, null, $opts); + } + } + $this->_endTable(); + break; + case 'remote-info': + $data = array( + 'caption' => 'Package details:', + 'border' => false, + 'data' => array( + array("Latest", $data['stable']), + array("Installed", $data['installed']), + array("Package", $data['name']), + array("License", $data['license']), + array("Category", $data['category']), + array("Summary", $data['summary']), + array("Description", $data['description']), + ), + ); + default: { + if (is_array($data)) { + $this->_startTable($data); + $count = count($data['data'][0]); + if ($count == 2) { + $opts = array(0 => array('wrap' => 25), + 1 => array('wrap' => 48) + ); + } elseif ($count == 3) { + $opts = array(0 => array('wrap' => 30), + 1 => array('wrap' => 20), + 2 => array('wrap' => 35) + ); + } else { + $opts = null; + } + if (isset($data['headline']) && is_array($data['headline'])) { + $this->_tableRow($data['headline'], + array('bold' => true), + $opts); + } + foreach($data['data'] as $row) { + $this->_tableRow($row, null, $opts); + } + $this->_endTable(); + } else { + $this->_displayLine($data); + } + } + } + } + + // }}} + // {{{ log(text) + + + function log($text, $append_crlf = true) + { + if ($append_crlf) { + return $this->_displayLine($text); + } + return $this->_display($text); + } + + + // }}} + // {{{ bold($text) + + function bold($text) + { + if (empty($this->term['bold'])) { + return strtoupper($text); + } + return $this->term['bold'] . $text . $this->term['normal']; + } + + // }}} +} + +?>
http://cvs.php.net/viewcvs.cgi/pear-core/package-PEAR.xml?r1=1.361&r2=1.362&diff_format=u Index: pear-core/package-PEAR.xml diff -u pear-core/package-PEAR.xml:1.361 pear-core/package-PEAR.xml:1.362 --- pear-core/package-PEAR.xml:1.361 Tue Mar 28 04:56:06 2006 +++ pear-core/package-PEAR.xml Tue Mar 28 05:33:42 2006 @@ -1,679 +1,679 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!--DOCTYPE package SYSTEM "http://pear.php.net/dtd/package-1.0"--> -<package version="1.0" xmlns="http://pear.php.net/dtd/package-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/package-1.0 -http://pear.php.net/dtd/package-1.0.xsd"> - <name>PEAR</name> - <summary>PEAR Base System</summary> - <description>The PEAR package contains: - * the PEAR installer, for creating, distributing - and installing packages - * the beta-quality PEAR_Exception PHP5 error handling mechanism - * the beta-quality PEAR_ErrorStack advanced error handling mechanism - * the PEAR_Error error handling mechanism - * the OS_Guess class for retrieving info about the OS - where PHP is running on - * the System class for quick handling of common operations - with files and directories - * the PEAR base class - - New features in a nutshell: - * full support for channels - * pre-download dependency validation - * new package.xml 2.0 format allows tremendous flexibility while maintaining BC - * support for optional dependency groups and limited support for sub-packaging - * robust dependency support - * full dependency validation on uninstall - * remote install for hosts with only ftp access - no more problems with - restricted host installation - * full support for mirroring - * support for bundling several packages into a single tarball - * support for static dependencies on a url-based package - * support for custom file roles and installation tasks - - NOTE: users of PEAR_Frontend_Web/PEAR_Frontend_Gtk must upgrade their installations - to the latest version, or PEAR will not upgrade properly - </description> - <maintainers> - <maintainer> - <user>cellog</user> - <role>lead</role> - <name>Greg Beaver</name> - <email>cellog@php.net</email> - </maintainer> - <maintainer> - <user>ssb</user> - <role>lead</role> - <name>Stig Bakken</name> - <email>stig@php.net</email> - </maintainer> - <maintainer> - <user>cox</user> - <role>lead</role> - <name>Tomas V.V.Cox</name> - <email>cox@idecnet.com</email> - </maintainer> - <maintainer> - <user>pajoye</user> - <role>lead</role> - <name>Pierre-Alain Joye</name> - <email>pajoye@pearfr.org</email> - </maintainer> - <maintainer> - <user>timj</user> - <role>helper</role> - <name>Tim Jackson</name> - <email>timj@php.net</email> - </maintainer> - <maintainer> - <user>toggg</user> - <role>helper</role> - <name>Bertrand Gugger</name> - <email>toggg@php.net</email> - </maintainer> - <maintainer> - <user>mj</user> - <role>helper</role> - <name>Martin Jansen</name> - <email>mj@php.net</email> - </maintainer> - </maintainers> - <release> - <version>1.5.0a1</version> - <date>2006-05-01</date> - <license>PHP License</license> - <state>alpha</state> - <notes> - Minor feature addition/bugfixes - * fix Bug #6931: pear upgrade PEAR-alpha tries to upgrade to 1.4.0a12 - * fix Bug #7021: Everything must be within <dir name="/"> - * fix Bug #7196: PEAR crashes when using autoload_prepend_file - * fix Bug #7207: proxy user/pass is not urldecoded in download - * fix Bug #7219: bogus "will download PEAR 1.4.8" error - * fix Bug #7221: pear install blah-alpha won't install a newer stable - * implement Request #6614: use go-pear style dialogs in PEAR_Command_CLI by default - * implement Request #6702: implement TAP output option for run-tests command - (as defined by http://perldoc.perl.org/Test/Harness/TAP.html) - * implement Request #7090: PEAR_Downloader mustn't contact pear server - when installing local package file - </notes> - <provides type="class" name="OS_Guess"/> - <provides type="class" name="System"/> - <provides type="function" name="md5_file"/> - <deps> - <dep type="php" rel="ge" version="4.3.0"/> - <dep type="pkg" rel="ge" version="1.3.3">PEAR</dep> - <dep type="pkg" rel="ge" version="1.3.1">Archive_Tar</dep> - <dep type="pkg" rel="ge" version="1.2">Console_Getopt</dep> - <dep type="pkg" rel="ge" version="1.4.0" optional="yes">XML_RPC</dep> - <dep type="pkg" rel="ge" version="0.5.0" optional="yes">PEAR_Frontend_Web</dep> - <dep type="pkg" rel="ge" version="0.4.0" optional="yes">PEAR_Frontend_Gtk</dep> - <dep type="ext" rel="has">xml</dep> - <dep type="ext" rel="has">pcre</dep> - </deps> - <filelist> - <dir name="OS"> - <file role="php" name="Guess.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <dir name="PEAR"> - <dir name="ChannelFile"> - <file name="Parser.php" role="php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <dir name="Command"> - <file role="php" name="Auth.xml"/> - <file role="php" name="Auth.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Build.xml"/> - <file role="php" name="Build.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Channels.xml"/> - <file role="php" name="Channels.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Common.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Config.xml"/> - <file role="php" name="Config.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Install.xml"/> - <file role="php" name="Install.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Package.xml"/> - <file role="php" name="Package.php"> - <replace from="@DATA-DIR@" to="data_dir" type="pear-config"/> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Pickle.xml"/> - <file role="php" name="Pickle.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Registry.xml"/> - <file role="php" name="Registry.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Remote.xml"/> - <file role="php" name="Remote.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Mirror.xml"/> - <file role="php" name="Mirror.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Test.xml"/> - <file role="php" name="Test.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <dir name="Downloader"> - <file role="php" name="Package.php"> - <replace from="@PEAR-VER@" to="version" type="package-info"/> - </file> - </dir> - <dir name="Frontend"> - <file role="php" name="CLI.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <dir name="Installer"> - <dir name="Role"> - <file role="php" name="Common.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Data.xml"/> - <file role="php" name="Data.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Doc.xml"/> - <file role="php" name="Doc.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Ext.xml"/> - <file role="php" name="Ext.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Php.xml"/> - <file role="php" name="Php.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Script.xml"/> - <file role="php" name="Script.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Src.xml"/> - <file role="php" name="Src.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Test.xml"/> - <file role="php" name="Test.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <file role="php" name="Role.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <dir name="PackageFile"> - <dir name="Generator"> - <file role="php" name="v1.php"> - <replace from="@PEAR-VER@" to="version" type="package-info"/> - </file> - <file role="php" name="v2.php"> - <replace from="@PEAR-VER@" to="version" type="package-info"/> - </file> - </dir> - <dir name="Parser"> - <file role="php" name="v1.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="v2.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <dir name="v2"> - <file role="php" name="rw.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Validator.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <file role="php" name="v1.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="v2.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <dir name="REST"> - <file role="php" name="10.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="11.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <dir name="Task"> - <dir name="Postinstallscript"> - <file role="php" name="rw.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <dir name="Replace"> - <file role="php" name="rw.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <dir name="Unixeol"> - <file role="php" name="rw.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <dir name="Windowseol"> - <file role="php" name="rw.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <file role="php" name="Common.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Postinstallscript.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Replace.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Unixeol.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Windowseol.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <dir name="Validator"> - <file role="php" name="PECL.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <file role="php" name="Autoloader.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Builder.php"> - <replace from="@PEAR-VER@" to="version" type="package-info"/> - </file> - <file role="php" name="ChannelFile.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Command.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Common.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Config.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Dependency.php"/> - <file role="php" name="DependencyDB.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Dependency2.php"> - <replace from="@PEAR-VER@" to="version" type="package-info"/> - </file> - <file role="php" name="Downloader.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="ErrorStack.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Exception.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Frontend.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Installer.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Packager.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="PackageFile.php"> - <replace from="@PEAR-VER@" to="version" type="package-info"/> - </file> - <file role="php" name="Registry.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Remote.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="REST.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="RunTest.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="Validate.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="XMLParser.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </dir> - <dir name="scripts" baseinstalldir="/"> - <file role="script" install-as="pear" name="pear.sh" platform="!windows"> - <replace from="@php_bin@" to="php_bin" type="pear-config"/> - <replace from="@php_dir@" to="php_dir" type="pear-config"/> - <replace from="@pear_version@" to="version" type="package-info"/> - <replace from="@include_path@" to="php_dir" type="pear-config"/> - </file> - <file role="script" install-as="peardev" name="peardev.sh" platform="!windows"> - <replace from="@php_bin@" to="php_bin" type="pear-config"/> - <replace from="@php_dir@" to="php_dir" type="pear-config"/> - <replace from="@pear_version@" to="version" type="package-info"/> - <replace from="@include_path@" to="php_dir" type="pear-config"/> - </file> - <file role="script" install-as="pecl" name="pecl.sh" platform="!windows"> - <replace from="@php_bin@" to="php_bin" type="pear-config"/> - <replace from="@php_dir@" to="php_dir" type="pear-config"/> - <replace from="@pear_version@" to="version" type="package-info"/> - <replace from="@include_path@" to="php_dir" type="pear-config"/> - </file> - <file role="script" platform="windows" install-as="peardev.bat" name="peardev.bat"> - <replace from="@bin_dir@" to="bin_dir" type="pear-config"/> - <replace from="@php_bin@" to="php_bin" type="pear-config"/> - <replace from="@include_path@" to="php_dir" type="pear-config"/> - </file> - <file role="script" platform="windows" install-as="pear.bat" name="pear.bat"> - <replace from="@bin_dir@" to="bin_dir" type="pear-config"/> - <replace from="@php_bin@" to="php_bin" type="pear-config"/> - <replace from="@include_path@" to="php_dir" type="pear-config"/> - </file> - <file role="script" platform="windows" install-as="pecl.bat" name="pecl.bat"> - <replace from="@bin_dir@" to="bin_dir" type="pear-config"/> - <replace from="@php_bin@" to="php_bin" type="pear-config"/> - <replace from="@include_path@" to="php_dir" type="pear-config"/> - </file> - <file role="php" install-as="pearcmd.php" name="pearcmd.php"> - <replace from="@php_bin@" to="php_bin" type="pear-config"/> - <replace from="@php_dir@" to="php_dir" type="pear-config"/> - <replace from="@pear_version@" to="version" type="package-info"/> - <replace from="@include_path@" to="php_dir" type="pear-config"/> - </file> - <file role="php" install-as="peclcmd.php" name="peclcmd.php"> - <replace from="@php_bin@" to="php_bin" type="pear-config"/> - <replace from="@php_dir@" to="php_dir" type="pear-config"/> - <replace from="@pear_version@" to="version" type="package-info"/> - <replace from="@include_path@" to="php_dir" type="pear-config"/> - </file> - </dir> - <file role="data" name="package.dtd"/> - <file role="data" name="template.spec"/> - <file role="php" name="PEAR.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - <file role="php" name="System.php"> - <replace from="@package_version@" to="version" type="package-info"/> - </file> - </filelist> - </release> - <changelog> - <release> - <version>1.4.0</version> - <date>2005-09-18</date> - <license>PHP License</license> - <state>stable</state> - <notes> - This is a major milestone release for PEAR. In addition to several killer features, - every single element of PEAR has a regression test, and so stability is much higher - than any previous PEAR release. - - New features in a nutshell: - * full support for channels - * pre-download dependency validation - * new package.xml 2.0 format allows tremendous flexibility while maintaining BC - * support for optional dependency groups and limited support for sub-packaging - * robust dependency support - * full dependency validation on uninstall - * remote install for hosts with only ftp access - no more problems with - restricted host installation - * full support for mirroring - * support for bundling several packages into a single tarball - * support for static dependencies on a url-based package - * support for custom file roles and installation tasks - - NOTE: users of PEAR_Frontend_Web/PEAR_Frontend_Gtk must upgrade their installations - to the latest version, or PEAR will not upgrade properly - </notes> - </release> - <release> - <version>1.4.1</version> - <date>2005-09-25</date> - <license>PHP License</license> - <state>stable</state> - <notes> - Major bugfix release. This is a recommended download for ALL PEAR users - - UPGRADING FROM 1.4.0 WILL CAUSE A SERIES OF NOTICES. IGNORE THEM. - THIS IS CAUSED BY A BUG IN 1.4.0 THAT IS FIXED IN 1.4.1 - - * fix prompt processing in post-install scripts - * make dual package.xml equivalency stricter when using package.xml/package2.xml - * fix critical error in validating bogus php dependencies of package.xml 1.0 - This error has existed for every PEAR version, and allows dependencies like: - <dep type="php" rel="has">4.3.0</dep> to - slip through unnoticed - * re-enable php-const replacements - * PEAR_PackageFile_v2::getConfigureOptions() was missing!! - * fix cvsdiff command - * fix xml encoding issues finally - * clean up package.xml 1.0 dir/file parsing - * fix invalid PEAR_Config generation - * change the user agent from PHP/phpversion to PEAR/pearversion/PHP/phpversion - * don't use a bogus uri for licenses on running convert command - * add "pickle" command for PECL packaging - * add validation warning if the release date in package.xml is not today when packaging - * implement progress bar for list-all/remote-list - * fix Bug #5323: pear search returns odd version numbers - * fix Bug #5428: pear cvstag package2.xml does not include the package.xml - * fix Bug #5449: pear makerpm completely broken for package.xml 2.0 - * fix Bug #5462: raiseError method does not return by ref anymore - * fix Bug #5465: pear install --offline fails to display error - * fix Bug #5477: Bug in Downloader.php and Dependency2.php - * fix Bug #5481: "pear install PECLextension" should display warning to use pecl command - * fix Bug #5482: installation of PECL packages should say add extensions to php.ini - * fix Bug #5483: pecl uninstall crack fatal error - * fix Bug #5487: PECL: compiled files are not uninstalled via the uninstall command - * fix Bug #5488: pecl uninstall package fails if package has a package.xml 1.0 - * fix Bug #5501: the commands list mentions XML-RPC - * fix Bug #5509: addDependecyGroup does not validate group name - * fix Bug #5513: PEAR 1.4 does not install non-pear.php.net packages - </notes> - </release> - <release> - <version>1.4.2</version> - <date>2005-10-08</date> - <license>PHP License</license> - <state>stable</state> - <notes> - Minor bugfix release - - * fix issues with API for adding tasks to package2.xml - * fix Bug #5520: pecl pickle fails on pecl pickle fails on extension/package deps - * fix Bug #5523: pecl pickle misses to put configureoptions into package.xml v1 - * fix Bug #5527: No need for cpp - * fix Bug #5529: configure options in package.xml 2.0 will be ignored - * fix Bug #5530: PEAR_PackageFile_v2->getConfigureOptions() API incompatible with v1 - * fix Bug #5531: adding of installconditions/binarypackage/configure options - to extsrc may fail - * fix Bug #5550: PHP notices/warnings/errors are 1 file off in trace - * fix Bug #5580: pear makerpm XML_sql2xml-0.3.2.tgz error - * fix Bug #5619: pear makerpm produces invalid .spec dependancy code - * fix Bug #5629: pear install http_download dies with bad error message - </notes> - </release> - <release> - <version>1.4.3</version> - <date>2005-11-03</date> - <license>PHP License</license> - <state>stable</state> - <notes> - MINOR SECURITY FIX release - - A security vulnerability has been discovered in all - PEAR versions (1.0 to 1.4.2). This vulnerability has been fixed, - and this is a recommended upgrade for all users. - - Run "pear channel-update" after upgrading for exponentially - faster list-all/remote-list!! - - * fix installation of files named like ".test" - * fix base class for writeable unixeol/windowseol classes - * fix running of post-install scripts with empty or no paramgroup - in CLI frontend - * fix validation of <postinstallscript> - * fix writeable PEAR_Task_Postinstallscript_rw class - * fix error in REST-based search command if searching through description - as well - * silence warning on list-upgrades/upgrade-all if no releases exist at a channel - * add checks for updated channel.xml in all remote commands - * fix pecl script if safe_mode is enabled by default - * implement SERIOUS improvement in list-all/remote-list speed. From 6 minutes - down to about 16-30 seconds - * implement --loose option to avoid recommended version validation - * implement Request #5527: alternative approach to determining glibc version - * fix Bug #5717: analyzeSourceCode() fails to process certain - quote situations properly - * fix Bug #5736: if registry can't lock registry or open filemap, - checkFileMap(), no error - * fix Bug #5676: pear config-create broken - * fix Bug #5683: Deadlock with (almost) circular dependency - * fix Bug #5725: PHP5 warnings need improvement - * fix Bug #5789: small typo - * fix Bug #5810: internet should not be contacted on install if dependencies are installed - </notes> - </release> - <release> - <version>1.4.4</version> - <date>2005-11-04</date> - <license>PHP License</license> - <state>stable</state> - <notes> - * fix Bug #5865: doesn't work with PHP4.2.x - </notes> - </release> - <release> - <version>1.4.5</version> - <date>2005-11-21</date> - <license>PHP License</license> - <state>stable</state> - <notes> - * REALLY fix Bug #5865: doesn't work with PHP4.2.x - * fix Bug #5854: if no installconditions match, no error is raised - * fix Bug #5945: installer should auto-skip to the next channel on timeout - * fix Bug #5947: Some package-info not handled by PEAR_PackageFile_v2 - * fix Bug #5948: Minor typo in PEAR_Validate - * fix Bug #5958: strange error on mistyping - * fix Bug #5959: patch: pear makerpm produces RPMs that do not uninstall/upgrade cleanly - </notes> - </release> - <release> - <version>1.4.6</version> - <date>2006-01-06</date> - <license>PHP License</license> - <state>stable</state> - <notes> - Minor bugfix release - * fix problem with -options when using CGI version of PHP - * fix Critical Bug #5999: support for baseinstalldir broken in package2.xml format - * fix Bug #6034: date format bug - * fix Bug #6040: PEAR_Frontend#setFrontendClass has no docblock; - PEAR_Frontend not documented - * fix Bug #6044: PEAR_REST::retrieveCacheFirst doesn't return error codes - * fix Bug #6047: pear makerpm fails to handle docs in root directory - * fix Bug #6048: PEAR_Frontend::log parameters are wrong - * fix Bug #6106: Notices by list-upgrades (caused by time-outs ?) - * fix Bug #6145: Can't install PEAR with INSTALL_ROOT environment - * fix Bug #6218: the "pear" command does nothing - * fix Bug #6269: System::which() returns silliness if passed null - * fix Bug #6322: Installer fails to follow redirects [patch by Bertrand Gugger] - * fix Request #6119: Add PEAR_Frontend_Gtk2 support to PEAR - </notes> - </release> - <release> - <version>1.4.7</version> - <date>2006-02-27</date> - <license>PHP License</license> - <state>stable</state> - <notes> - Minor bugfix release - * Prevent packaging of release candidate releases with versions like 1.0.0rc1 - version_compare() only understands upper-case 1.0.0RC1 - * implement CLEAN section in .phpt tests - * implement run-tests command for phpunit-based tests - * implement Request #6039: setFrontendObject needed to allow objects passed - * fix Bug #6075: unnecessary validation of maintainers can break PEAR_PFM - * fix Bug #6076: optional is not set for conversion of package2.xml to "has" rel - * fix Bug #6077: PEAR_PackageFile_Parser_v2 should return by reference - * fix Bug #6273: pear download-all fails - * fix Bug #6383: incomplete PEAR::Error message on addReplacement() - * fix Bug #6445: PEAR::registerShutdownFunc doesn't work in static calls - * fix Bug #6480: pear install --installroot option fails for pecl packages [timj] - * fix Bug #6510: status active of a maintainer cannot be change - * fix Bug #6537: wrong export compatible v1 dependencies list with exclude limit - * fix Bug #6559: pear should ignore safemode/open_basedir - * fix Bug #6576: PFM2 run in trouble with sessions - * fix Bug #6579: PFM2 changelog and license with uri - * fix Bug #6673: pear install --offline --packagingroot=/blah does not work - * fix Bug #6674: --packagingroot always uses channel pear.php.net configuration - * fix Bug #6675: postinstallscript validation fails - * fix Bug #6690: channel with / will not allow upgrade - * fix Bug #6692: Optional feature install message needs channel name - * fix Bug #6716: "pear install -r" errors after install when - attempting "pear list <pkgname>" - * fix Bug #6735: PEAR_PackageFile::fromTgzFile doesn't work with package.xml - not in root dir - </notes> - </release> - <release> - <version>1.4.8</version> - <date>2006-03-05</date> - <license>PHP License</license> - <state>stable</state> - <notes> - CRITICAL BUGFIX RELEASE - - Channels with "-" in their name were suddenly invalid, and - caused crashes in many places due to improper error handling - * fix Bug #6960: channels are not allowed to have "-" in their name - * fix critical Bug #6969: PEAR list-upgrades crashes - * fix Bug #6991: Class 'PEAR_PackageFile_v1' not found in Registry.php at line 1657 - * fix Bug #7008: PEAR_Frontend::setFrontendObject doesn't set the object - * fix Bug #7015: install a package.tgz with unknown channel, fatal error in PEAR/Registry.php - * fix Bug #7020: tests/PEAR_Registry/api1_1/test_getChannelValidator.phpt crashes PEAR - </notes> - </release> - <release> - <version>1.4.9</version> - <date>2006-03-29</date> - <license>PHP License</license> - <state>stable</state> - <notes> - CRITICAL BUGFIX RELEASE - users upgrading from PEAR 1.3.x cannot upgrade to 1.4.8 - users who use --packagingroot may find that installation fails - * fix Bug #7093: if pear channel does not exist, it cannot be retrieved - * fix Bug #7165: warnings in pear - * fix Bug #7075: PEAR_PackageFile_v2 :: setLogger failed on autodetection - </notes> - </notes> - </release> - </changelog> -</package> +<?xml version="1.0" encoding="ISO-8859-1"?> +<!--DOCTYPE package SYSTEM "http://pear.php.net/dtd/package-1.0"--> +<package version="1.0" xmlns="http://pear.php.net/dtd/package-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/package-1.0 +http://pear.php.net/dtd/package-1.0.xsd"> + <name>PEAR</name> + <summary>PEAR Base System</summary> + <description>The PEAR package contains: + * the PEAR installer, for creating, distributing + and installing packages + * the beta-quality PEAR_Exception PHP5 error handling mechanism + * the beta-quality PEAR_ErrorStack advanced error handling mechanism + * the PEAR_Error error handling mechanism + * the OS_Guess class for retrieving info about the OS + where PHP is running on + * the System class for quick handling of common operations + with files and directories + * the PEAR base class + + New features in a nutshell: + * full support for channels + * pre-download dependency validation + * new package.xml 2.0 format allows tremendous flexibility while maintaining BC + * support for optional dependency groups and limited support for sub-packaging + * robust dependency support + * full dependency validation on uninstall + * remote install for hosts with only ftp access - no more problems with + restricted host installation + * full support for mirroring + * support for bundling several packages into a single tarball + * support for static dependencies on a url-based package + * support for custom file roles and installation tasks + + NOTE: users of PEAR_Frontend_Web/PEAR_Frontend_Gtk must upgrade their installations + to the latest version, or PEAR will not upgrade properly + </description> + <maintainers> + <maintainer> + <user>cellog</user> + <role>lead</role> + <name>Greg Beaver</name> + <email>cellog@php.net</email> + </maintainer> + <maintainer> + <user>ssb</user> + <role>lead</role> + <name>Stig Bakken</name> + <email>stig@php.net</email> + </maintainer> + <maintainer> + <user>cox</user> + <role>lead</role> + <name>Tomas V.V.Cox</name> + <email>cox@idecnet.com</email> + </maintainer> + <maintainer> + <user>pajoye</user> + <role>lead</role> + <name>Pierre-Alain Joye</name> + <email>pajoye@pearfr.org</email> + </maintainer> + <maintainer> + <user>timj</user> + <role>helper</role> + <name>Tim Jackson</name> + <email>timj@php.net</email> + </maintainer> + <maintainer> + <user>toggg</user> + <role>helper</role> + <name>Bertrand Gugger</name> + <email>toggg@php.net</email> + </maintainer> + <maintainer> + <user>mj</user> + <role>helper</role> + <name>Martin Jansen</name> + <email>mj@php.net</email> + </maintainer> + </maintainers> + <release> + <version>1.5.0a1</version> + <date>2006-05-01</date> + <license>PHP License</license> + <state>alpha</state> + <notes> + Minor feature addition/bugfixes + * fix Bug #6931: pear upgrade PEAR-alpha tries to upgrade to 1.4.0a12 + * fix Bug #7021: Everything must be within <dir name="/"> + * fix Bug #7196: PEAR crashes when using autoload_prepend_file + * fix Bug #7207: proxy user/pass is not urldecoded in download + * fix Bug #7219: bogus "will download PEAR 1.4.8" error + * fix Bug #7221: pear install blah-alpha won't install a newer stable + * implement Request #6614: use go-pear style dialogs in PEAR_Command_CLI by default + * implement Request #6702: implement TAP output option for run-tests command + (as defined by http://perldoc.perl.org/Test/Harness/TAP.html) + * implement Request #7090: PEAR_Downloader mustn't contact pear server + when installing local package file + </notes> + <provides type="class" name="OS_Guess"/> + <provides type="class" name="System"/> + <provides type="function" name="md5_file"/> + <deps> + <dep type="php" rel="ge" version="4.3.0"/> + <dep type="pkg" rel="ge" version="1.3.3">PEAR</dep> + <dep type="pkg" rel="ge" version="1.3.1">Archive_Tar</dep> + <dep type="pkg" rel="ge" version="1.2">Console_Getopt</dep> + <dep type="pkg" rel="ge" version="1.4.0" optional="yes">XML_RPC</dep> + <dep type="pkg" rel="ge" version="0.5.0" optional="yes">PEAR_Frontend_Web</dep> + <dep type="pkg" rel="ge" version="0.4.0" optional="yes">PEAR_Frontend_Gtk</dep> + <dep type="ext" rel="has">xml</dep> + <dep type="ext" rel="has">pcre</dep> + </deps> + <filelist> + <dir name="OS"> + <file role="php" name="Guess.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <dir name="PEAR"> + <dir name="ChannelFile"> + <file name="Parser.php" role="php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <dir name="Command"> + <file role="php" name="Auth.xml"/> + <file role="php" name="Auth.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Build.xml"/> + <file role="php" name="Build.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Channels.xml"/> + <file role="php" name="Channels.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Common.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Config.xml"/> + <file role="php" name="Config.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Install.xml"/> + <file role="php" name="Install.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Package.xml"/> + <file role="php" name="Package.php"> + <replace from="@DATA-DIR@" to="data_dir" type="pear-config"/> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Pickle.xml"/> + <file role="php" name="Pickle.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Registry.xml"/> + <file role="php" name="Registry.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Remote.xml"/> + <file role="php" name="Remote.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Mirror.xml"/> + <file role="php" name="Mirror.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Test.xml"/> + <file role="php" name="Test.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <dir name="Downloader"> + <file role="php" name="Package.php"> + <replace from="@PEAR-VER@" to="version" type="package-info"/> + </file> + </dir> + <dir name="Frontend"> + <file role="php" name="CLI.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <dir name="Installer"> + <dir name="Role"> + <file role="php" name="Common.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Data.xml"/> + <file role="php" name="Data.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Doc.xml"/> + <file role="php" name="Doc.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Ext.xml"/> + <file role="php" name="Ext.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Php.xml"/> + <file role="php" name="Php.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Script.xml"/> + <file role="php" name="Script.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Src.xml"/> + <file role="php" name="Src.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Test.xml"/> + <file role="php" name="Test.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <file role="php" name="Role.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <dir name="PackageFile"> + <dir name="Generator"> + <file role="php" name="v1.php"> + <replace from="@PEAR-VER@" to="version" type="package-info"/> + </file> + <file role="php" name="v2.php"> + <replace from="@PEAR-VER@" to="version" type="package-info"/> + </file> + </dir> + <dir name="Parser"> + <file role="php" name="v1.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="v2.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <dir name="v2"> + <file role="php" name="rw.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Validator.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <file role="php" name="v1.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="v2.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <dir name="REST"> + <file role="php" name="10.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="11.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <dir name="Task"> + <dir name="Postinstallscript"> + <file role="php" name="rw.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <dir name="Replace"> + <file role="php" name="rw.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <dir name="Unixeol"> + <file role="php" name="rw.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <dir name="Windowseol"> + <file role="php" name="rw.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <file role="php" name="Common.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Postinstallscript.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Replace.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Unixeol.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Windowseol.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <dir name="Validator"> + <file role="php" name="PECL.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <file role="php" name="Autoloader.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Builder.php"> + <replace from="@PEAR-VER@" to="version" type="package-info"/> + </file> + <file role="php" name="ChannelFile.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Command.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Common.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Config.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Dependency.php"/> + <file role="php" name="DependencyDB.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Dependency2.php"> + <replace from="@PEAR-VER@" to="version" type="package-info"/> + </file> + <file role="php" name="Downloader.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="ErrorStack.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Exception.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Frontend.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Installer.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Packager.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="PackageFile.php"> + <replace from="@PEAR-VER@" to="version" type="package-info"/> + </file> + <file role="php" name="Registry.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Remote.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="REST.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="RunTest.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="Validate.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="XMLParser.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </dir> + <dir name="scripts" baseinstalldir="/"> + <file role="script" install-as="pear" name="pear.sh" platform="!windows"> + <replace from="@php_bin@" to="php_bin" type="pear-config"/> + <replace from="@php_dir@" to="php_dir" type="pear-config"/> + <replace from="@pear_version@" to="version" type="package-info"/> + <replace from="@include_path@" to="php_dir" type="pear-config"/> + </file> + <file role="script" install-as="peardev" name="peardev.sh" platform="!windows"> + <replace from="@php_bin@" to="php_bin" type="pear-config"/> + <replace from="@php_dir@" to="php_dir" type="pear-config"/> + <replace from="@pear_version@" to="version" type="package-info"/> + <replace from="@include_path@" to="php_dir" type="pear-config"/> + </file> + <file role="script" install-as="pecl" name="pecl.sh" platform="!windows"> + <replace from="@php_bin@" to="php_bin" type="pear-config"/> + <replace from="@php_dir@" to="php_dir" type="pear-config"/> + <replace from="@pear_version@" to="version" type="package-info"/> + <replace from="@include_path@" to="php_dir" type="pear-config"/> + </file> + <file role="script" platform="windows" install-as="peardev.bat" name="peardev.bat"> + <replace from="@bin_dir@" to="bin_dir" type="pear-config"/> + <replace from="@php_bin@" to="php_bin" type="pear-config"/> + <replace from="@include_path@" to="php_dir" type="pear-config"/> + </file> + <file role="script" platform="windows" install-as="pear.bat" name="pear.bat"> + <replace from="@bin_dir@" to="bin_dir" type="pear-config"/> + <replace from="@php_bin@" to="php_bin" type="pear-config"/> + <replace from="@include_path@" to="php_dir" type="pear-config"/> + </file> + <file role="script" platform="windows" install-as="pecl.bat" name="pecl.bat"> + <replace from="@bin_dir@" to="bin_dir" type="pear-config"/> + <replace from="@php_bin@" to="php_bin" type="pear-config"/> + <replace from="@include_path@" to="php_dir" type="pear-config"/> + </file> + <file role="php" install-as="pearcmd.php" name="pearcmd.php"> + <replace from="@php_bin@" to="php_bin" type="pear-config"/> + <replace from="@php_dir@" to="php_dir" type="pear-config"/> + <replace from="@pear_version@" to="version" type="package-info"/> + <replace from="@include_path@" to="php_dir" type="pear-config"/> + </file> + <file role="php" install-as="peclcmd.php" name="peclcmd.php"> + <replace from="@php_bin@" to="php_bin" type="pear-config"/> + <replace from="@php_dir@" to="php_dir" type="pear-config"/> + <replace from="@pear_version@" to="version" type="package-info"/> + <replace from="@include_path@" to="php_dir" type="pear-config"/> + </file> + </dir> + <file role="data" name="package.dtd"/> + <file role="data" name="template.spec"/> + <file role="php" name="PEAR.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + <file role="php" name="System.php"> + <replace from="@package_version@" to="version" type="package-info"/> + </file> + </filelist> + </release> + <changelog> + <release> + <version>1.4.0</version> + <date>2005-09-18</date> + <license>PHP License</license> + <state>stable</state> + <notes> + This is a major milestone release for PEAR. In addition to several killer features, + every single element of PEAR has a regression test, and so stability is much higher + than any previous PEAR release. + + New features in a nutshell: + * full support for channels + * pre-download dependency validation + * new package.xml 2.0 format allows tremendous flexibility while maintaining BC + * support for optional dependency groups and limited support for sub-packaging + * robust dependency support + * full dependency validation on uninstall + * remote install for hosts with only ftp access - no more problems with + restricted host installation + * full support for mirroring + * support for bundling several packages into a single tarball + * support for static dependencies on a url-based package + * support for custom file roles and installation tasks + + NOTE: users of PEAR_Frontend_Web/PEAR_Frontend_Gtk must upgrade their installations + to the latest version, or PEAR will not upgrade properly + </notes> + </release> + <release> + <version>1.4.1</version> + <date>2005-09-25</date> + <license>PHP License</license> + <state>stable</state> + <notes> + Major bugfix release. This is a recommended download for ALL PEAR users + + UPGRADING FROM 1.4.0 WILL CAUSE A SERIES OF NOTICES. IGNORE THEM. + THIS IS CAUSED BY A BUG IN 1.4.0 THAT IS FIXED IN 1.4.1 + + * fix prompt processing in post-install scripts + * make dual package.xml equivalency stricter when using package.xml/package2.xml + * fix critical error in validating bogus php dependencies of package.xml 1.0 + This error has existed for every PEAR version, and allows dependencies like: + <dep type="php" rel="has">4.3.0</dep> to + slip through unnoticed + * re-enable php-const replacements + * PEAR_PackageFile_v2::getConfigureOptions() was missing!! + * fix cvsdiff command + * fix xml encoding issues finally + * clean up package.xml 1.0 dir/file parsing + * fix invalid PEAR_Config generation + * change the user agent from PHP/phpversion to PEAR/pearversion/PHP/phpversion + * don't use a bogus uri for licenses on running convert command + * add "pickle" command for PECL packaging + * add validation warning if the release date in package.xml is not today when packaging + * implement progress bar for list-all/remote-list + * fix Bug #5323: pear search returns odd version numbers + * fix Bug #5428: pear cvstag package2.xml does not include the package.xml + * fix Bug #5449: pear makerpm completely broken for package.xml 2.0 + * fix Bug #5462: raiseError method does not return by ref anymore + * fix Bug #5465: pear install --offline fails to display error + * fix Bug #5477: Bug in Downloader.php and Dependency2.php + * fix Bug #5481: "pear install PECLextension" should display warning to use pecl command + * fix Bug #5482: installation of PECL packages should say add extensions to php.ini + * fix Bug #5483: pecl uninstall crack fatal error + * fix Bug #5487: PECL: compiled files are not uninstalled via the uninstall command + * fix Bug #5488: pecl uninstall package fails if package has a package.xml 1.0 + * fix Bug #5501: the commands list mentions XML-RPC + * fix Bug #5509: addDependecyGroup does not validate group name + * fix Bug #5513: PEAR 1.4 does not install non-pear.php.net packages + </notes> + </release> + <release> + <version>1.4.2</version> + <date>2005-10-08</date> + <license>PHP License</license> + <state>stable</state> + <notes> + Minor bugfix release + + * fix issues with API for adding tasks to package2.xml + * fix Bug #5520: pecl pickle fails on pecl pickle fails on extension/package deps + * fix Bug #5523: pecl pickle misses to put configureoptions into package.xml v1 + * fix Bug #5527: No need for cpp + * fix Bug #5529: configure options in package.xml 2.0 will be ignored + * fix Bug #5530: PEAR_PackageFile_v2->getConfigureOptions() API incompatible with v1 + * fix Bug #5531: adding of installconditions/binarypackage/configure options + to extsrc may fail + * fix Bug #5550: PHP notices/warnings/errors are 1 file off in trace + * fix Bug #5580: pear makerpm XML_sql2xml-0.3.2.tgz error + * fix Bug #5619: pear makerpm produces invalid .spec dependancy code + * fix Bug #5629: pear install http_download dies with bad error message + </notes> + </release> + <release> + <version>1.4.3</version> + <date>2005-11-03</date> + <license>PHP License</license> + <state>stable</state> + <notes> + MINOR SECURITY FIX release + + A security vulnerability has been discovered in all + PEAR versions (1.0 to 1.4.2). This vulnerability has been fixed, + and this is a recommended upgrade for all users. + + Run "pear channel-update" after upgrading for exponentially + faster list-all/remote-list!! + + * fix installation of files named like ".test" + * fix base class for writeable unixeol/windowseol classes + * fix running of post-install scripts with empty or no paramgroup + in CLI frontend + * fix validation of <postinstallscript> + * fix writeable PEAR_Task_Postinstallscript_rw class + * fix error in REST-based search command if searching through description + as well + * silence warning on list-upgrades/upgrade-all if no releases exist at a channel + * add checks for updated channel.xml in all remote commands + * fix pecl script if safe_mode is enabled by default + * implement SERIOUS improvement in list-all/remote-list speed. From 6 minutes + down to about 16-30 seconds + * implement --loose option to avoid recommended version validation + * implement Request #5527: alternative approach to determining glibc version + * fix Bug #5717: analyzeSourceCode() fails to process certain + quote situations properly + * fix Bug #5736: if registry can't lock registry or open filemap, + checkFileMap(), no error + * fix Bug #5676: pear config-create broken + * fix Bug #5683: Deadlock with (almost) circular dependency + * fix Bug #5725: PHP5 warnings need improvement + * fix Bug #5789: small typo + * fix Bug #5810: internet should not be contacted on install if dependencies are installed + </notes> + </release> + <release> + <version>1.4.4</version> + <date>2005-11-04</date> + <license>PHP License</license> + <state>stable</state> + <notes> + * fix Bug #5865: doesn't work with PHP4.2.x + </notes> + </release> + <release> + <version>1.4.5</version> + <date>2005-11-21</date> + <license>PHP License</license> + <state>stable</state> + <notes> + * REALLY fix Bug #5865: doesn't work with PHP4.2.x + * fix Bug #5854: if no installconditions match, no error is raised + * fix Bug #5945: installer should auto-skip to the next channel on timeout + * fix Bug #5947: Some package-info not handled by PEAR_PackageFile_v2 + * fix Bug #5948: Minor typo in PEAR_Validate + * fix Bug #5958: strange error on mistyping + * fix Bug #5959: patch: pear makerpm produces RPMs that do not uninstall/upgrade cleanly + </notes> + </release> + <release> + <version>1.4.6</version> + <date>2006-01-06</date> + <license>PHP License</license> + <state>stable</state> + <notes> + Minor bugfix release + * fix problem with -options when using CGI version of PHP + * fix Critical Bug #5999: support for baseinstalldir broken in package2.xml format + * fix Bug #6034: date format bug + * fix Bug #6040: PEAR_Frontend#setFrontendClass has no docblock; + PEAR_Frontend not documented + * fix Bug #6044: PEAR_REST::retrieveCacheFirst doesn't return error codes + * fix Bug #6047: pear makerpm fails to handle docs in root directory + * fix Bug #6048: PEAR_Frontend::log parameters are wrong + * fix Bug #6106: Notices by list-upgrades (caused by time-outs ?) + * fix Bug #6145: Can't install PEAR with INSTALL_ROOT environment + * fix Bug #6218: the "pear" command does nothing + * fix Bug #6269: System::which() returns silliness if passed null + * fix Bug #6322: Installer fails to follow redirects [patch by Bertrand Gugger] + * fix Request #6119: Add PEAR_Frontend_Gtk2 support to PEAR + </notes> + </release> + <release> + <version>1.4.7</version> + <date>2006-02-27</date> + <license>PHP License</license> + <state>stable</state> + <notes> + Minor bugfix release + * Prevent packaging of release candidate releases with versions like 1.0.0rc1 + version_compare() only understands upper-case 1.0.0RC1 + * implement CLEAN section in .phpt tests + * implement run-tests command for phpunit-based tests + * implement Request #6039: setFrontendObject needed to allow objects passed + * fix Bug #6075: unnecessary validation of maintainers can break PEAR_PFM + * fix Bug #6076: optional is not set for conversion of package2.xml to "has" rel + * fix Bug #6077: PEAR_PackageFile_Parser_v2 should return by reference + * fix Bug #6273: pear download-all fails + * fix Bug #6383: incomplete PEAR::Error message on addReplacement() + * fix Bug #6445: PEAR::registerShutdownFunc doesn't work in static calls + * fix Bug #6480: pear install --installroot option fails for pecl packages [timj] + * fix Bug #6510: status active of a maintainer cannot be change + * fix Bug #6537: wrong export compatible v1 dependencies list with exclude limit + * fix Bug #6559: pear should ignore safemode/open_basedir + * fix Bug #6576: PFM2 run in trouble with sessions + * fix Bug #6579: PFM2 changelog and license with uri + * fix Bug #6673: pear install --offline --packagingroot=/blah does not work + * fix Bug #6674: --packagingroot always uses channel pear.php.net configuration + * fix Bug #6675: postinstallscript validation fails + * fix Bug #6690: channel with / will not allow upgrade + * fix Bug #6692: Optional feature install message needs channel name + * fix Bug #6716: "pear install -r" errors after install when + attempting "pear list <pkgname>" + * fix Bug #6735: PEAR_PackageFile::fromTgzFile doesn't work with package.xml + not in root dir + </notes> + </release> + <release> + <version>1.4.8</version> + <date>2006-03-05</date> + <license>PHP License</license> + <state>stable</state> + <notes> + CRITICAL BUGFIX RELEASE + + Channels with "-" in their name were suddenly invalid, and + caused crashes in many places due to improper error handling + * fix Bug #6960: channels are not allowed to have "-" in their name + * fix critical Bug #6969: PEAR list-upgrades crashes + * fix Bug #6991: Class 'PEAR_PackageFile_v1' not found in Registry.php at line 1657 + * fix Bug #7008: PEAR_Frontend::setFrontendObject doesn't set the object + * fix Bug #7015: install a package.tgz with unknown channel, fatal error in PEAR/Registry.php + * fix Bug #7020: tests/PEAR_Registry/api1_1/test_getChannelValidator.phpt crashes PEAR + </notes> + </release> + <release> + <version>1.4.9</version> + <date>2006-03-29</date> + <license>PHP License</license> + <state>stable</state> + <notes> + CRITICAL BUGFIX RELEASE + users upgrading from PEAR 1.3.x cannot upgrade to 1.4.8 + users who use --packagingroot may find that installation fails + * fix Bug #7093: if pear channel does not exist, it cannot be retrieved + * fix Bug #7165: warnings in pear + * fix Bug #7075: PEAR_PackageFile_v2 :: setLogger failed on autodetection + </notes> + </notes> + </release> + </changelog> +</package> http://cvs.php.net/viewcvs.cgi/pear-core/package2.xml?r1=1.255&r2=1.256&diff_format=u Index: pear-core/package2.xml diff -u pear-core/package2.xml:1.255 pear-core/package2.xml:1.256 --- pear-core/package2.xml:1.255 Tue Mar 28 04:56:06 2006 +++ pear-core/package2.xml Tue Mar 28 05:33:42 2006 @@ -1,843 +1,843 @@ -<?xml version="1.0" encoding="UTF-8"?> -<package version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 -http://pear.php.net/dtd/tasks-1.0.xsd -http://pear.php.net/dtd/package-2.0 -http://pear.php.net/dtd/package-2.0.xsd"> - <name>PEAR</name> - <channel>pear.php.net</channel> - <summary>PEAR Base System</summary> - <description>The PEAR package contains: - * the PEAR installer, for creating, distributing - and installing packages - * the beta-quality PEAR_Exception PHP5 error handling mechanism - * the beta-quality PEAR_ErrorStack advanced error handling mechanism - * the PEAR_Error error handling mechanism - * the OS_Guess class for retrieving info about the OS - where PHP is running on - * the System class for quick handling of common operations - with files and directories - * the PEAR base class - - New features in a nutshell: - * full support for channels - * pre-download dependency validation - * new package.xml 2.0 format allows tremendous flexibility while maintaining BC - * support for optional dependency groups and limited support for sub-packaging - * robust dependency support - * full dependency validation on uninstall - * remote install for hosts with only ftp access - no more problems with - restricted host installation - * full support for mirroring - * support for bundling several packages into a single tarball - * support for static dependencies on a url-based package - * support for custom file roles and installation tasks - - NOTE: users of PEAR_Frontend_Web/PEAR_Frontend_Gtk must upgrade their installations - to the latest version, or PEAR will not upgrade properly - </description> - <lead> - <name>Greg Beaver</name> - <user>cellog</user> - <email>cellog@php.net</email> - <active>yes</active> - </lead> - <lead> - <name>Stig Bakken</name> - <user>ssb</user> - <email>stig@php.net</email> - <active>yes</active> - </lead> - <lead> - <name>Tomas V.V.Cox</name> - <user>cox</user> - <email>cox@idecnet.com</email> - <active>yes</active> - </lead> - <lead> - <name>Pierre-Alain Joye</name> - <user>pajoye</user> - <email>pajoye@pearfr.org</email> - <active>yes</active> - </lead> - <helper> - <name>Tim Jackson</name> - <user>timj</user> - <email>timj@php.net</email> - <active>yes</active> - </helper> - <helper> - <name>Bertrand Gugger</name> - <user>toggg</user> - <email>toggg@php.net</email> - <active>yes</active> - </helper> - <helper> - <name>Martin Jansen</name> - <user>mj</user> - <email>mj@php.net</email> - <active>no</active> - </helper> - <date>2006-05-01</date> - <version> - <release>1.5.0a1</release> - <api>1.5.0</api> - </version> - <stability> - <release>alpha</release> - <api>alpha</api> - </stability> - <license uri="http://www.php.net/license">PHP License</license> - <notes> - Minor feature addition/bugfixes - * fix Bug #6931: pear upgrade PEAR-alpha tries to upgrade to 1.4.0a12 - * fix Bug #7021: Everything must be within <dir name="/"> - * fix Bug #7196: PEAR crashes when using autoload_prepend_file - * fix Bug #7207: proxy user/pass is not urldecoded in download - * fix Bug #7219: bogus "will download PEAR 1.4.8" error - * fix Bug #7221: pear install blah-alpha won't install a newer stable - * implement Request #6614: use go-pear style dialogs in PEAR_Command_CLI by default - * implement Request #6702: implement TAP output option for run-tests command - (as defined by http://perldoc.perl.org/Test/Harness/TAP.html) - * implement Request #7090: PEAR_Downloader mustn't contact pear server - when installing local package file - </notes> - <contents> - <dir name="/"> - <dir name="OS"> - <file name="Guess.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /OS --> - <dir name="PEAR"> - <dir name="ChannelFile"> - <file name="Parser.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/ChannelFile --> - <dir name="Command"> - <file name="Auth.xml" role="php"/> - <file name="Auth.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Build.xml" role="php"/> - <file name="Build.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Channels.xml" role="php"/> - <file name="Channels.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Common.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Config.xml" role="php"/> - <file name="Config.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Install.xml" role="php"/> - <file name="Install.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Mirror.xml" role="php"/> - <file name="Mirror.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Package.xml" role="php"/> - <file name="Package.php" role="php"> - <tasks:replace from="@DATA-DIR@" to="data_dir" type="pear-config" /> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Pickle.xml" role="php"/> - <file name="Pickle.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Registry.xml" role="php"/> - <file name="Registry.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Remote.xml" role="php"/> - <file name="Remote.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Test.xml" role="php"/> - <file name="Test.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/Command --> - <dir name="Downloader"> - <file name="Package.php" role="php"> - <tasks:replace from="@PEAR-VER@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/Downloader --> - <dir name="Frontend"> - <file name="CLI.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/Frontend --> - <dir name="Installer"> - <dir name="Role"> - <file name="Common.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Data.xml" role="php"/> - <file name="Data.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Doc.xml" role="php"/> - <file name="Doc.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Ext.xml" role="php"/> - <file name="Ext.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Php.xml" role="php"/> - <file name="Php.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Script.xml" role="php"/> - <file name="Script.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Src.xml" role="php"/> - <file name="Src.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Test.xml" role="php"/> - <file name="Test.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/Installer/Role --> - <file name="Role.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/Installer --> - <dir name="PackageFile"> - <dir name="Generator"> - <file name="v1.php" role="php"> - <tasks:replace from="@PEAR-VER@" to="version" type="package-info" /> - </file> - <file name="v2.php" role="php"> - <tasks:replace from="@PEAR-VER@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/PackageFile/Generator --> - <dir name="Parser"> - <file name="v1.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="v2.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/PackageFile/Parser --> - <dir name="v2"> - <file role="php" name="rw.php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file role="php" name="Validator.php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/PackageFile/v2 --> - <file name="v1.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="v2.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/PackageFile --> - <dir name="REST"> - <file name="10.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="11.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/REST --> - <dir name="Task"> - <dir name="Postinstallscript"> - <file name="rw.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/Task/Postinstallscript --> - <dir name="Replace"> - <file name="rw.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/Task/Replace --> - <dir name="Unixeol"> - <file name="rw.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/Task/Unixeol --> - <dir name="Windowseol"> - <file name="rw.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/Task/Windowseol --> - <file name="Common.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Postinstallscript.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Replace.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Unixeol.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Windowseol.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/Task --> - <dir name="Validator"> - <file name="PECL.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR/Validator --> - <file name="Autoloader.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Builder.php" role="php"> - <tasks:replace from="@PEAR-VER@" to="version" type="package-info"/> - </file> - <file name="ChannelFile.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Command.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Common.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Config.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Dependency.php" role="php" /> - <file name="DependencyDB.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Dependency2.php" role="php"> - <tasks:replace from="@PEAR-VER@" to="version" type="package-info"/> - </file> - <file name="Downloader.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="ErrorStack.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Exception.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Frontend.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Installer.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="PackageFile.php" role="php"> - <tasks:replace from="@PEAR-VER@" to="version" type="package-info" /> - </file> - <file name="Packager.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Registry.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Remote.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="REST.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="RunTest.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="Validate.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="XMLParser.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - </dir> <!-- /PEAR --> - <dir name="scripts" baseinstalldir="/"> - <file name="pear.bat" role="script"> - <tasks:replace from="@bin_dir@" to="bin_dir" type="pear-config" /> - <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> - <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> - <tasks:windowseol/> - </file> - <file name="peardev.bat" role="script"> - <tasks:replace from="@bin_dir@" to="bin_dir" type="pear-config" /> - <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> - <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> - <tasks:windowseol/> - </file> - <file name="pecl.bat" role="script"> - <tasks:replace from="@bin_dir@" to="bin_dir" type="pear-config" /> - <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> - <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> - <tasks:windowseol/> - </file> - <file name="pear.sh" role="script"> - <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> - <tasks:replace from="@php_dir@" to="php_dir" type="pear-config" /> - <tasks:replace from="@pear_version@" to="version" type="package-info" /> - <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> - <tasks:unixeol/> - </file> - <file name="peardev.sh" role="script"> - <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> - <tasks:replace from="@php_dir@" to="php_dir" type="pear-config" /> - <tasks:replace from="@pear_version@" to="version" type="package-info" /> - <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> - <tasks:unixeol/> - </file> - <file name="pecl.sh" role="script"> - <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> - <tasks:replace from="@php_dir@" to="php_dir" type="pear-config" /> - <tasks:replace from="@pear_version@" to="version" type="package-info" /> - <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> - <tasks:unixeol/> - </file> - <file name="pearcmd.php" role="php"> - <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> - <tasks:replace from="@php_dir@" to="php_dir" type="pear-config" /> - <tasks:replace from="@pear_version@" to="version" type="package-info" /> - <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> - </file> - <file name="peclcmd.php" role="php"> - <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> - <tasks:replace from="@php_dir@" to="php_dir" type="pear-config" /> - <tasks:replace from="@pear_version@" to="version" type="package-info" /> - <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> - </file> - </dir> <!-- /scripts --> - <file name="package.dtd" role="data" /> - <file name="PEAR.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="System.php" role="php"> - <tasks:replace from="@package_version@" to="version" type="package-info" /> - </file> - <file name="template.spec" role="data" /> - </dir> <!-- / --> - </contents> - <dependencies> - <required> - <php> - <min>4.3.0</min> - </php> - <pearinstaller> - <min>1.4.3</min> - </pearinstaller> - <package> - <name>Archive_Tar</name> - <channel>pear.php.net</channel> - <min>1.1</min> - <recommended>1.3.1</recommended> - <exclude>1.3.0</exclude> - </package> - <package> - <name>Console_Getopt</name> - <channel>pear.php.net</channel> - <min>1.2</min> - <recommended>1.2</recommended> - </package> - <package> - <name>PEAR_Frontend_Web</name> - <channel>pear.php.net</channel> - <max>0.5.0</max> - <exclude>0.5.0</exclude> - <conflicts/> - </package> - <package> - <name>PEAR_Frontend_Gtk</name> - <channel>pear.php.net</channel> - <max>0.4.0</max> - <exclude>0.4.0</exclude> - <conflicts/> - </package> - <extension> - <name>xml</name> - </extension> - <extension> - <name>pcre</name> - </extension> - </required> - <optional> - <package> - <name>XML_RPC</name> - <channel>pear.php.net</channel> - <min>1.4.0</min> - </package> - </optional> -<!-- <group name="remoteinstall" hint="adds the ability to install packages to a remote ftp server"> - <subpackage> - <name>PEAR_RemoteInstaller</name> - <channel>pear.php.net</channel> - <min>0.1.0</min> - <recommended>0.1.0</recommended> - </subpackage> - </group> --> - <group name="webinstaller" hint="PEAR's web-based installer"> - <package> - <name>PEAR_Frontend_Web</name> - <channel>pear.php.net</channel> - <min>0.5.0</min> - </package> - </group> - <group name="gtkinstaller" hint="PEAR's PHP-GTK-based installer"> - <package> - <name>PEAR_Frontend_Gtk</name> - <channel>pear.php.net</channel> - <min>0.4.0</min> - </package> - </group> - <group name="gtk2installer" hint="PEAR's PHP-GTK2-based installer"> - <package> - <name>PEAR_Frontend_Gtk2</name> - <channel>pear.php.net</channel> - </package> - </group> - </dependencies> - <phprelease> - <installconditions> - <os> - <name>windows</name> - </os> - </installconditions> - <filelist> - <install as="pear.bat" name="scripts/pear.bat" /> - <install as="peardev.bat" name="scripts/peardev.bat" /> - <install as="pecl.bat" name="scripts/pecl.bat" /> - <install as="pearcmd.php" name="scripts/pearcmd.php" /> - <install as="peclcmd.php" name="scripts/peclcmd.php" /> - <ignore name="scripts/peardev.sh" /> - <ignore name="scripts/pear.sh" /> - <ignore name="scripts/pecl.sh" /> - </filelist> - </phprelease> - <phprelease> - <filelist> - <install as="pear" name="scripts/pear.sh" /> - <install as="peardev" name="scripts/peardev.sh" /> - <install as="pecl" name="scripts/pecl.sh" /> - <install as="pearcmd.php" name="scripts/pearcmd.php" /> - <install as="peclcmd.php" name="scripts/peclcmd.php" /> - <ignore name="scripts/pear.bat" /> - <ignore name="scripts/peardev.bat" /> - <ignore name="scripts/pecl.bat" /> - </filelist> - </phprelease> - <changelog> - <release> - <version> - <release>1.4.0</release> - <api>1.4.0</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2005-09-18</date> - <license uri="http://www.php.net/license/3_0.txt">PHP License</license> - <notes> - This is a major milestone release for PEAR. In addition to several killer features, - every single element of PEAR has a regression test, and so stability is much higher - than any previous PEAR release. - - New features in a nutshell: - * full support for channels - * pre-download dependency validation - * new package.xml 2.0 format allows tremendous flexibility while maintaining BC - * support for optional dependency groups and limited support for sub-packaging - * robust dependency support - * full dependency validation on uninstall - * remote install for hosts with only ftp access - no more problems with - restricted host installation [through PEAR_RemoteInstaller package] - * full support for mirroring - * support for bundling several packages into a single tarball - * support for static dependencies on a uri-based package - * support for custom file roles and installation tasks - - NOTE: users of PEAR_Frontend_Web/PEAR_Frontend_Gtk must upgrade their installations - to the latest version, or PEAR will not upgrade properly - </notes> - </release> - <release> - <version> - <release>1.4.1</release> - <api>1.4.0</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2005-09-25</date> - <license uri="http://www.php.net/license/3_0.txt">PHP License</license> - <notes> - Major bugfix release. This is a recommended download for ALL PEAR users - - UPGRADING FROM 1.4.0 WILL CAUSE A SERIES OF NOTICES. IGNORE THEM. - THIS IS CAUSED BY A BUG IN 1.4.0 THAT IS FIXED IN 1.4.1 - - * fix prompt processing in post-install scripts - * make dual package.xml equivalency stricter when using package.xml/package2.xml - * fix critical error in validating bogus php dependencies of package.xml 1.0 - This error has existed for every PEAR version, and allows dependencies like: - <dep type="php" rel="has">4.3.0</dep> to - slip through unnoticed - * re-enable php-const replacements - * PEAR_PackageFile_v2::getConfigureOptions() was missing!! - * fix cvsdiff command - * fix xml encoding issues finally - * clean up package.xml 1.0 dir/file parsing - * fix invalid PEAR_Config generation - * change the user agent from PHP/phpversion to PEAR/pearversion/PHP/phpversion - * don't use a bogus uri for licenses on running convert command - * add "pickle" command for PECL packaging - * add validation warning if the release date in package.xml is not today when packaging - * implement progress bar for list-all/remote-list - * fix Bug #5323: pear search returns odd version numbers - * fix Bug #5428: pear cvstag package2.xml does not include the package.xml - * fix Bug #5449: pear makerpm completely broken for package.xml 2.0 - * fix Bug #5462: raiseError method does not return by ref anymore - * fix Bug #5465: pear install --offline fails to display error - * fix Bug #5477: Bug in Downloader.php and Dependency2.php - * fix Bug #5481: "pear install PECLextension" should display warning to use pecl command - * fix Bug #5482: installation of PECL packages should say add extensions to php.ini - * fix Bug #5483: pecl uninstall crack fatal error - * fix Bug #5487: PECL: compiled files are not uninstalled via the uninstall command - * fix Bug #5488: pecl uninstall package fails if package has a package.xml 1.0 - * fix Bug #5501: the commands list mentions XML-RPC - * fix Bug #5509: addDependecyGroup does not validate group name - * fix Bug #5513: PEAR 1.4 does not install non-pear.php.net packages - </notes> - </release> - <release> - <version> - <release>1.4.2</release> - <api>1.4.0</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2005-10-08</date> - <license uri="http://www.php.net/license/3_0.txt">PHP License</license> - <notes> - Minor bugfix release - - * fix issues with API for adding tasks to package2.xml - * fix Bug #5520: pecl pickle fails on pecl pickle fails on extension/package deps - * fix Bug #5523: pecl pickle misses to put configureoptions into package.xml v1 - * fix Bug #5527: No need for cpp - * fix Bug #5529: configure options in package.xml 2.0 will be ignored - * fix Bug #5530: PEAR_PackageFile_v2->getConfigureOptions() API incompatible with v1 - * fix Bug #5531: adding of installconditions/binarypackage/configure options - to extsrc may fail - * fix Bug #5550: PHP notices/warnings/errors are 1 file off in trace - * fix Bug #5580: pear makerpm XML_sql2xml-0.3.2.tgz error - * fix Bug #5619: pear makerpm produces invalid .spec dependancy code - * fix Bug #5629: pear install http_download dies with bad error message - </notes> - </release> - <release> - <version> - <release>1.4.3</release> - <api>1.4.1</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2005-11-03</date> - <license uri="http://www.php.net/license/3_0.txt">PHP License</license> - <notes> - MINOR SECURITY FIX release - - A security vulnerability has been discovered in all - PEAR versions (1.0 to 1.4.2). This vulnerability has been fixed, - and this is a recommended upgrade for all users. - - Run "pear channel-update" after upgrading for exponentially - faster list-all/remote-list!! - - * fix installation of files named like ".test" - * fix base class for writeable unixeol/windowseol classes - * fix running of post-install scripts with empty or no paramgroup - in CLI frontend - * fix validation of <postinstallscript> - * fix writeable PEAR_Task_Postinstallscript_rw class - * fix error in REST-based search command if searching through description - as well - * silence warning on list-upgrades/upgrade-all if no releases exist at a channel - * add checks for updated channel.xml in all remote commands - * fix pecl script if safe_mode is enabled by default - * implement SERIOUS improvement in list-all/remote-list speed. From 6 minutes - down to about 16-30 seconds - * implement --loose option to avoid recommended version validation - * implement Request #5527: alternative approach to determining glibc version - * fix Bug #5717: analyzeSourceCode() fails to process certain - quote situations properly - * fix Bug #5736: if registry can't lock registry or open filemap, - checkFileMap(), no error - * fix Bug #5676: pear config-create broken - * fix Bug #5683: Deadlock with (almost) circular dependency - * fix Bug #5725: PHP5 warnings need improvement - * fix Bug #5789: small typo - * fix Bug #5810: internet should not be contacted on install if dependencies are installed - </notes> - </release> - <release> - <version> - <release>1.4.4</release> - <api>1.4.1</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2005-11-04</date> - <license uri="http://www.php.net/license/3_0.txt">PHP License</license> - <notes> - * fix Bug #5865: doesn't work with PHP4.2.x - </notes> - </release> - <release> - <version> - <release>1.4.5</release> - <api>1.4.1</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2005-11-21</date> - <license uri="http://www.php.net/license/3_0.txt">PHP License</license> - <notes> - * REALLY fix Bug #5865: doesn't work with PHP4.2.x - * fix Bug #5854: if no installconditions match, no error is raised - * fix Bug #5945: installer should auto-skip to the next channel on timeout - * fix Bug #5947: Some package-info not handled by PEAR_PackageFile_v2 - * fix Bug #5948: Minor typo in PEAR_Validate - * fix Bug #5958: strange error on mistyping - * fix Bug #5959: patch: pear makerpm produces RPMs that do not uninstall/upgrade cleanly - </notes> - </release> - <release> - <version> - <release>1.4.6</release> - <api>1.4.1</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2006-01-06</date> - <license uri="http://www.php.net/license/3_0.txt">PHP License</license> - <notes> - Minor bugfix release - * fix problem with -options when using CGI version of PHP - * fix Critical Bug #5999: support for baseinstalldir broken in package2.xml format - * fix Bug #6034: date format bug - * fix Bug #6040: PEAR_Frontend#setFrontendClass has no docblock; - PEAR_Frontend not documented - * fix Bug #6044: PEAR_REST::retrieveCacheFirst doesn't return error codes - * fix Bug #6047: pear makerpm fails to handle docs in root directory - * fix Bug #6048: PEAR_Frontend::log parameters are wrong - * fix Bug #6106: Notices by list-upgrades (caused by time-outs ?) - * fix Bug #6145: Can't install PEAR with INSTALL_ROOT environment - * fix Bug #6218: the "pear" command does nothing - * fix Bug #6269: System::which() returns silliness if passed null - * fix Bug #6322: Installer fails to follow redirects [patch by Bertrand Gugger] - * fix Request #6119: Add PEAR_Frontend_Gtk2 support to PEAR - </notes> - </release> - <release> - <version> - <release>1.4.7</release> - <api>1.4.1</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2006-02-27</date> - <license uri="http://www.php.net/license/3_0.txt">PHP License</license> - <notes> - Minor bugfix release - * Prevent packaging of release candidate releases with versions like 1.0.0rc1 - version_compare() only understands upper-case 1.0.0RC1 - * implement CLEAN section in .phpt tests - * implement run-tests command for phpunit-based tests - * implement Request #6039: setFrontendObject needed to allow objects passed - * fix Bug #6075: unnecessary validation of maintainers can break PEAR_PFM - * fix Bug #6076: optional is not set for conversion of package2.xml to "has" rel - * fix Bug #6077: PEAR_PackageFile_Parser_v2 should return by reference - * fix Bug #6273: pear download-all fails - * fix Bug #6383: incomplete PEAR::Error message on addReplacement() - * fix Bug #6445: PEAR::registerShutdownFunc doesn't work in static calls - * fix Bug #6480: pear install --installroot option fails for pecl packages [timj] - * fix Bug #6510: status active of a maintainer cannot be change - * fix Bug #6537: wrong export compatible v1 dependencies list with exclude limit - * fix Bug #6559: pear should ignore safemode/open_basedir - * fix Bug #6576: PFM2 run in trouble with sessions - * fix Bug #6579: PFM2 changelog and license with uri - * fix Bug #6673: pear install --offline --packagingroot=/blah does not work - * fix Bug #6674: --packagingroot always uses channel pear.php.net configuration - * fix Bug #6675: postinstallscript validation fails - * fix Bug #6690: channel with / will not allow upgrade - * fix Bug #6692: Optional feature install message needs channel name - * fix Bug #6716: "pear install -r" errors after install when - attempting "pear list <pkgname>" - * fix Bug #6735: PEAR_PackageFile::fromTgzFile doesn't work with package.xml - not in root dir - </notes> - </release> - <release> - <version> - <release>1.4.8</release> - <api>1.4.2</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2006-03-05</date> - <license uri="http://www.php.net/license/3_0.txt">PHP License</license> - <notes> - CRITICAL BUGFIX RELEASE - - Channels with "-" in their name were suddenly invalid, and - caused crashes in many places due to improper error handling - * fix Bug #6960: channels are not allowed to have "-" in their name - * fix critical Bug #6969: PEAR list-upgrades crashes - * fix Bug #6991: Class 'PEAR_PackageFile_v1' not found in Registry.php at line 1657 - * fix Bug #7008: PEAR_Frontend::setFrontendObject doesn't set the object - * fix Bug #7015: install a package.tgz with unknown channel, fatal error in PEAR/Registry.php - * fix Bug #7020: tests/PEAR_Registry/api1_1/test_getChannelValidator.phpt crashes PEAR - </notes> - </release> - <release> - <version> - <release>1.4.9</release> - <api>1.4.2</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <date>2006-03-29</date> - <license uri="http://www.php.net/license">PHP License</license> - <notes> - CRITICAL BUGFIX RELEASE - users upgrading from PEAR 1.3.x cannot upgrade to 1.4.8 - users who use --packagingroot may find that installation fails - * fix Bug #7093: if pear channel does not exist, it cannot be retrieved - * fix Bug #7165: warnings in pear - * fix Bug #7075: PEAR_PackageFile_v2 :: setLogger failed on autodetection - </notes> - </release> - </changelog> -</package> +<?xml version="1.0" encoding="UTF-8"?> +<package version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 +http://pear.php.net/dtd/tasks-1.0.xsd +http://pear.php.net/dtd/package-2.0 +http://pear.php.net/dtd/package-2.0.xsd"> + <name>PEAR</name> + <channel>pear.php.net</channel> + <summary>PEAR Base System</summary> + <description>The PEAR package contains: + * the PEAR installer, for creating, distributing + and installing packages + * the beta-quality PEAR_Exception PHP5 error handling mechanism + * the beta-quality PEAR_ErrorStack advanced error handling mechanism + * the PEAR_Error error handling mechanism + * the OS_Guess class for retrieving info about the OS + where PHP is running on + * the System class for quick handling of common operations + with files and directories + * the PEAR base class + + New features in a nutshell: + * full support for channels + * pre-download dependency validation + * new package.xml 2.0 format allows tremendous flexibility while maintaining BC + * support for optional dependency groups and limited support for sub-packaging + * robust dependency support + * full dependency validation on uninstall + * remote install for hosts with only ftp access - no more problems with + restricted host installation + * full support for mirroring + * support for bundling several packages into a single tarball + * support for static dependencies on a url-based package + * support for custom file roles and installation tasks + + NOTE: users of PEAR_Frontend_Web/PEAR_Frontend_Gtk must upgrade their installations + to the latest version, or PEAR will not upgrade properly + </description> + <lead> + <name>Greg Beaver</name> + <user>cellog</user> + <email>cellog@php.net</email> + <active>yes</active> + </lead> + <lead> + <name>Stig Bakken</name> + <user>ssb</user> + <email>stig@php.net</email> + <active>yes</active> + </lead> + <lead> + <name>Tomas V.V.Cox</name> + <user>cox</user> + <email>cox@idecnet.com</email> + <active>yes</active> + </lead> + <lead> + <name>Pierre-Alain Joye</name> + <user>pajoye</user> + <email>pajoye@pearfr.org</email> + <active>yes</active> + </lead> + <helper> + <name>Tim Jackson</name> + <user>timj</user> + <email>timj@php.net</email> + <active>yes</active> + </helper> + <helper> + <name>Bertrand Gugger</name> + <user>toggg</user> + <email>toggg@php.net</email> + <active>yes</active> + </helper> + <helper> + <name>Martin Jansen</name> + <user>mj</user> + <email>mj@php.net</email> + <active>no</active> + </helper> + <date>2006-05-01</date> + <version> + <release>1.5.0a1</release> + <api>1.5.0</api> + </version> + <stability> + <release>alpha</release> + <api>alpha</api> + </stability> + <license uri="http://www.php.net/license">PHP License</license> + <notes> + Minor feature addition/bugfixes + * fix Bug #6931: pear upgrade PEAR-alpha tries to upgrade to 1.4.0a12 + * fix Bug #7021: Everything must be within <dir name="/"> + * fix Bug #7196: PEAR crashes when using autoload_prepend_file + * fix Bug #7207: proxy user/pass is not urldecoded in download + * fix Bug #7219: bogus "will download PEAR 1.4.8" error + * fix Bug #7221: pear install blah-alpha won't install a newer stable + * implement Request #6614: use go-pear style dialogs in PEAR_Command_CLI by default + * implement Request #6702: implement TAP output option for run-tests command + (as defined by http://perldoc.perl.org/Test/Harness/TAP.html) + * implement Request #7090: PEAR_Downloader mustn't contact pear server + when installing local package file + </notes> + <contents> + <dir name="/"> + <dir name="OS"> + <file name="Guess.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /OS --> + <dir name="PEAR"> + <dir name="ChannelFile"> + <file name="Parser.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/ChannelFile --> + <dir name="Command"> + <file name="Auth.xml" role="php"/> + <file name="Auth.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Build.xml" role="php"/> + <file name="Build.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Channels.xml" role="php"/> + <file name="Channels.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Common.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Config.xml" role="php"/> + <file name="Config.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Install.xml" role="php"/> + <file name="Install.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Mirror.xml" role="php"/> + <file name="Mirror.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Package.xml" role="php"/> + <file name="Package.php" role="php"> + <tasks:replace from="@DATA-DIR@" to="data_dir" type="pear-config" /> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Pickle.xml" role="php"/> + <file name="Pickle.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Registry.xml" role="php"/> + <file name="Registry.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Remote.xml" role="php"/> + <file name="Remote.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Test.xml" role="php"/> + <file name="Test.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/Command --> + <dir name="Downloader"> + <file name="Package.php" role="php"> + <tasks:replace from="@PEAR-VER@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/Downloader --> + <dir name="Frontend"> + <file name="CLI.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/Frontend --> + <dir name="Installer"> + <dir name="Role"> + <file name="Common.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Data.xml" role="php"/> + <file name="Data.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Doc.xml" role="php"/> + <file name="Doc.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Ext.xml" role="php"/> + <file name="Ext.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Php.xml" role="php"/> + <file name="Php.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Script.xml" role="php"/> + <file name="Script.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Src.xml" role="php"/> + <file name="Src.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Test.xml" role="php"/> + <file name="Test.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/Installer/Role --> + <file name="Role.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/Installer --> + <dir name="PackageFile"> + <dir name="Generator"> + <file name="v1.php" role="php"> + <tasks:replace from="@PEAR-VER@" to="version" type="package-info" /> + </file> + <file name="v2.php" role="php"> + <tasks:replace from="@PEAR-VER@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/PackageFile/Generator --> + <dir name="Parser"> + <file name="v1.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="v2.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/PackageFile/Parser --> + <dir name="v2"> + <file role="php" name="rw.php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file role="php" name="Validator.php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/PackageFile/v2 --> + <file name="v1.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="v2.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/PackageFile --> + <dir name="REST"> + <file name="10.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="11.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/REST --> + <dir name="Task"> + <dir name="Postinstallscript"> + <file name="rw.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/Task/Postinstallscript --> + <dir name="Replace"> + <file name="rw.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/Task/Replace --> + <dir name="Unixeol"> + <file name="rw.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/Task/Unixeol --> + <dir name="Windowseol"> + <file name="rw.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/Task/Windowseol --> + <file name="Common.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Postinstallscript.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Replace.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Unixeol.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Windowseol.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/Task --> + <dir name="Validator"> + <file name="PECL.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR/Validator --> + <file name="Autoloader.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Builder.php" role="php"> + <tasks:replace from="@PEAR-VER@" to="version" type="package-info"/> + </file> + <file name="ChannelFile.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Command.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Common.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Config.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Dependency.php" role="php" /> + <file name="DependencyDB.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Dependency2.php" role="php"> + <tasks:replace from="@PEAR-VER@" to="version" type="package-info"/> + </file> + <file name="Downloader.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="ErrorStack.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Exception.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Frontend.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Installer.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="PackageFile.php" role="php"> + <tasks:replace from="@PEAR-VER@" to="version" type="package-info" /> + </file> + <file name="Packager.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Registry.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Remote.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="REST.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="RunTest.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="Validate.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="XMLParser.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + </dir> <!-- /PEAR --> + <dir name="scripts" baseinstalldir="/"> + <file name="pear.bat" role="script"> + <tasks:replace from="@bin_dir@" to="bin_dir" type="pear-config" /> + <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> + <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> + <tasks:windowseol/> + </file> + <file name="peardev.bat" role="script"> + <tasks:replace from="@bin_dir@" to="bin_dir" type="pear-config" /> + <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> + <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> + <tasks:windowseol/> + </file> + <file name="pecl.bat" role="script"> + <tasks:replace from="@bin_dir@" to="bin_dir" type="pear-config" /> + <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> + <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> + <tasks:windowseol/> + </file> + <file name="pear.sh" role="script"> + <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> + <tasks:replace from="@php_dir@" to="php_dir" type="pear-config" /> + <tasks:replace from="@pear_version@" to="version" type="package-info" /> + <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> + <tasks:unixeol/> + </file> + <file name="peardev.sh" role="script"> + <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> + <tasks:replace from="@php_dir@" to="php_dir" type="pear-config" /> + <tasks:replace from="@pear_version@" to="version" type="package-info" /> + <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> + <tasks:unixeol/> + </file> + <file name="pecl.sh" role="script"> + <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> + <tasks:replace from="@php_dir@" to="php_dir" type="pear-config" /> + <tasks:replace from="@pear_version@" to="version" type="package-info" /> + <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> + <tasks:unixeol/> + </file> + <file name="pearcmd.php" role="php"> + <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> + <tasks:replace from="@php_dir@" to="php_dir" type="pear-config" /> + <tasks:replace from="@pear_version@" to="version" type="package-info" /> + <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> + </file> + <file name="peclcmd.php" role="php"> + <tasks:replace from="@php_bin@" to="php_bin" type="pear-config" /> + <tasks:replace from="@php_dir@" to="php_dir" type="pear-config" /> + <tasks:replace from="@pear_version@" to="version" type="package-info" /> + <tasks:replace from="@include_path@" to="php_dir" type="pear-config" /> + </file> + </dir> <!-- /scripts --> + <file name="package.dtd" role="data" /> + <file name="PEAR.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="System.php" role="php"> + <tasks:replace from="@package_version@" to="version" type="package-info" /> + </file> + <file name="template.spec" role="data" /> + </dir> <!-- / --> + </contents> + <dependencies> + <required> + <php> + <min>4.3.0</min> + </php> + <pearinstaller> + <min>1.4.3</min> + </pearinstaller> + <package> + <name>Archive_Tar</name> + <channel>pear.php.net</channel> + <min>1.1</min> + <recommended>1.3.1</recommended> + <exclude>1.3.0</exclude> + </package> + <package> + <name>Console_Getopt</name> + <channel>pear.php.net</channel> + <min>1.2</min> + <recommended>1.2</recommended> + </package> + <package> + <name>PEAR_Frontend_Web</name> + <channel>pear.php.net</channel> + <max>0.5.0</max> + <exclude>0.5.0</exclude> + <conflicts/> + </package> + <package> + <name>PEAR_Frontend_Gtk</name> + <channel>pear.php.net</channel> + <max>0.4.0</max> + <exclude>0.4.0</exclude> + <conflicts/> + </package> + <extension> + <name>xml</name> + </extension> + <extension> + <name>pcre</name> + </extension> + </required> + <optional> + <package> + <name>XML_RPC</name> + <channel>pear.php.net</channel> + <min>1.4.0</min> + </package> + </optional> +<!-- <group name="remoteinstall" hint="adds the ability to install packages to a remote ftp server"> + <subpackage> + <name>PEAR_RemoteInstaller</name> + <channel>pear.php.net</channel> + <min>0.1.0</min> + <recommended>0.1.0</recommended> + </subpackage> + </group> --> + <group name="webinstaller" hint="PEAR's web-based installer"> + <package> + <name>PEAR_Frontend_Web</name> + <channel>pear.php.net</channel> + <min>0.5.0</min> + </package> + </group> + <group name="gtkinstaller" hint="PEAR's PHP-GTK-based installer"> + <package> + <name>PEAR_Frontend_Gtk</name> + <channel>pear.php.net</channel> + <min>0.4.0</min> + </package> + </group> + <group name="gtk2installer" hint="PEAR's PHP-GTK2-based installer"> + <package> + <name>PEAR_Frontend_Gtk2</name> + <channel>pear.php.net</channel> + </package> + </group> + </dependencies> + <phprelease> + <installconditions> + <os> + <name>windows</name> + </os> + </installconditions> + <filelist> + <install as="pear.bat" name="scripts/pear.bat" /> + <install as="peardev.bat" name="scripts/peardev.bat" /> + <install as="pecl.bat" name="scripts/pecl.bat" /> + <install as="pearcmd.php" name="scripts/pearcmd.php" /> + <install as="peclcmd.php" name="scripts/peclcmd.php" /> + <ignore name="scripts/peardev.sh" /> + <ignore name="scripts/pear.sh" /> + <ignore name="scripts/pecl.sh" /> + </filelist> + </phprelease> + <phprelease> + <filelist> + <install as="pear" name="scripts/pear.sh" /> + <install as="peardev" name="scripts/peardev.sh" /> + <install as="pecl" name="scripts/pecl.sh" /> + <install as="pearcmd.php" name="scripts/pearcmd.php" /> + <install as="peclcmd.php" name="scripts/peclcmd.php" /> + <ignore name="scripts/pear.bat" /> + <ignore name="scripts/peardev.bat" /> + <ignore name="scripts/pecl.bat" /> + </filelist> + </phprelease> + <changelog> + <release> + <version> + <release>1.4.0</release> + <api>1.4.0</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <date>2005-09-18</date> + <license uri="http://www.php.net/license/3_0.txt">PHP License</license> + <notes> + This is a major milestone release for PEAR. In addition to several killer features, + every single element of PEAR has a regression test, and so stability is much higher + than any previous PEAR release. + + New features in a nutshell: + * full support for channels + * pre-download dependency validation + * new package.xml 2.0 format allows tremendous flexibility while maintaining BC + * support for optional dependency groups and limited support for sub-packaging + * robust dependency support + * full dependency validation on uninstall + * remote install for hosts with only ftp access - no more problems with + restricted host installation [through PEAR_RemoteInstaller package] + * full support for mirroring + * support for bundling several packages into a single tarball + * support for static dependencies on a uri-based package + * support for custom file roles and installation tasks + + NOTE: users of PEAR_Frontend_Web/PEAR_Frontend_Gtk must upgrade their installations + to the latest version, or PEAR will not upgrade properly + </notes> + </release> + <release> + <version> + <release>1.4.1</release> + <api>1.4.0</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <date>2005-09-25</date> + <license uri="http://www.php.net/license/3_0.txt">PHP License</license> + <notes> + Major bugfix release. This is a recommended download for ALL PEAR users + + UPGRADING FROM 1.4.0 WILL CAUSE A SERIES OF NOTICES. IGNORE THEM. + THIS IS CAUSED BY A BUG IN 1.4.0 THAT IS FIXED IN 1.4.1 + + * fix prompt processing in post-install scripts + * make dual package.xml equivalency stricter when using package.xml/package2.xml + * fix critical error in validating bogus php dependencies of package.xml 1.0 + This error has existed for every PEAR version, and allows dependencies like: + <dep type="php" rel="has">4.3.0</dep> to + slip through unnoticed + * re-enable php-const replacements + * PEAR_PackageFile_v2::getConfigureOptions() was missing!! + * fix cvsdiff command + * fix xml encoding issues finally + * clean up package.xml 1.0 dir/file parsing + * fix invalid PEAR_Config generation + * change the user agent from PHP/phpversion to PEAR/pearversion/PHP/phpversion + * don't use a bogus uri for licenses on running convert command + * add "pickle" command for PECL packaging + * add validation warning if the release date in package.xml is not today when packaging + * implement progress bar for list-all/remote-list + * fix Bug #5323: pear search returns odd version numbers + * fix Bug #5428: pear cvstag package2.xml does not include the package.xml + * fix Bug #5449: pear makerpm completely broken for package.xml 2.0 + * fix Bug #5462: raiseError method does not return by ref anymore + * fix Bug #5465: pear install --offline fails to display error + * fix Bug #5477: Bug in Downloader.php and Dependency2.php + * fix Bug #5481: "pear install PECLextension" should display warning to use pecl command + * fix Bug #5482: installation of PECL packages should say add extensions to php.ini + * fix Bug #5483: pecl uninstall crack fatal error + * fix Bug #5487: PECL: compiled files are not uninstalled via the uninstall command + * fix Bug #5488: pecl uninstall package fails if package has a package.xml 1.0 + * fix Bug #5501: the commands list mentions XML-RPC + * fix Bug #5509: addDependecyGroup does not validate group name + * fix Bug #5513: PEAR 1.4 does not install non-pear.php.net packages + </notes> + </release> + <release> + <version> + <release>1.4.2</release> + <api>1.4.0</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <date>2005-10-08</date> + <license uri="http://www.php.net/license/3_0.txt">PHP License</license> + <notes> + Minor bugfix release + + * fix issues with API for adding tasks to package2.xml + * fix Bug #5520: pecl pickle fails on pecl pickle fails on extension/package deps + * fix Bug #5523: pecl pickle misses to put configureoptions into package.xml v1 + * fix Bug #5527: No need for cpp + * fix Bug #5529: configure options in package.xml 2.0 will be ignored + * fix Bug #5530: PEAR_PackageFile_v2->getConfigureOptions() API incompatible with v1 + * fix Bug #5531: adding of installconditions/binarypackage/configure options + to extsrc may fail + * fix Bug #5550: PHP notices/warnings/errors are 1 file off in trace + * fix Bug #5580: pear makerpm XML_sql2xml-0.3.2.tgz error + * fix Bug #5619: pear makerpm produces invalid .spec dependancy code + * fix Bug #5629: pear install http_download dies with bad error message + </notes> + </release> + <release> + <version> + <release>1.4.3</release> + <api>1.4.1</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <date>2005-11-03</date> + <license uri="http://www.php.net/license/3_0.txt">PHP License</license> + <notes> + MINOR SECURITY FIX release + + A security vulnerability has been discovered in all + PEAR versions (1.0 to 1.4.2). This vulnerability has been fixed, + and this is a recommended upgrade for all users. + + Run "pear channel-update" after upgrading for exponentially + faster list-all/remote-list!! + + * fix installation of files named like ".test" + * fix base class for writeable unixeol/windowseol classes + * fix running of post-install scripts with empty or no paramgroup + in CLI frontend + * fix validation of <postinstallscript> + * fix writeable PEAR_Task_Postinstallscript_rw class + * fix error in REST-based search command if searching through description + as well + * silence warning on list-upgrades/upgrade-all if no releases exist at a channel + * add checks for updated channel.xml in all remote commands + * fix pecl script if safe_mode is enabled by default + * implement SERIOUS improvement in list-all/remote-list speed. From 6 minutes + down to about 16-30 seconds + * implement --loose option to avoid recommended version validation + * implement Request #5527: alternative approach to determining glibc version + * fix Bug #5717: analyzeSourceCode() fails to process certain + quote situations properly + * fix Bug #5736: if registry can't lock registry or open filemap, + checkFileMap(), no error + * fix Bug #5676: pear config-create broken + * fix Bug #5683: Deadlock with (almost) circular dependency + * fix Bug #5725: PHP5 warnings need improvement + * fix Bug #5789: small typo + * fix Bug #5810: internet should not be contacted on install if dependencies are installed + </notes> + </release> + <release> + <version> + <release>1.4.4</release> + <api>1.4.1</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <date>2005-11-04</date> + <license uri="http://www.php.net/license/3_0.txt">PHP License</license> + <notes> + * fix Bug #5865: doesn't work with PHP4.2.x + </notes> + </release> + <release> + <version> + <release>1.4.5</release> + <api>1.4.1</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <date>2005-11-21</date> + <license uri="http://www.php.net/license/3_0.txt">PHP License</license> + <notes> + * REALLY fix Bug #5865: doesn't work with PHP4.2.x + * fix Bug #5854: if no installconditions match, no error is raised + * fix Bug #5945: installer should auto-skip to the next channel on timeout + * fix Bug #5947: Some package-info not handled by PEAR_PackageFile_v2 + * fix Bug #5948: Minor typo in PEAR_Validate + * fix Bug #5958: strange error on mistyping + * fix Bug #5959: patch: pear makerpm produces RPMs that do not uninstall/upgrade cleanly + </notes> + </release> + <release> + <version> + <release>1.4.6</release> + <api>1.4.1</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <date>2006-01-06</date> + <license uri="http://www.php.net/license/3_0.txt">PHP License</license> + <notes> + Minor bugfix release + * fix problem with -options when using CGI version of PHP + * fix Critical Bug #5999: support for baseinstalldir broken in package2.xml format + * fix Bug #6034: date format bug + * fix Bug #6040: PEAR_Frontend#setFrontendClass has no docblock; + PEAR_Frontend not documented + * fix Bug #6044: PEAR_REST::retrieveCacheFirst doesn't return error codes + * fix Bug #6047: pear makerpm fails to handle docs in root directory + * fix Bug #6048: PEAR_Frontend::log parameters are wrong + * fix Bug #6106: Notices by list-upgrades (caused by time-outs ?) + * fix Bug #6145: Can't install PEAR with INSTALL_ROOT environment + * fix Bug #6218: the "pear" command does nothing + * fix Bug #6269: System::which() returns silliness if passed null + * fix Bug #6322: Installer fails to follow redirects [patch by Bertrand Gugger] + * fix Request #6119: Add PEAR_Frontend_Gtk2 support to PEAR + </notes> + </release> + <release> + <version> + <release>1.4.7</release> + <api>1.4.1</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <date>2006-02-27</date> + <license uri="http://www.php.net/license/3_0.txt">PHP License</license> + <notes> + Minor bugfix release + * Prevent packaging of release candidate releases with versions like 1.0.0rc1 + version_compare() only understands upper-case 1.0.0RC1 + * implement CLEAN section in .phpt tests + * implement run-tests command for phpunit-based tests + * implement Request #6039: setFrontendObject needed to allow objects passed + * fix Bug #6075: unnecessary validation of maintainers can break PEAR_PFM + * fix Bug #6076: optional is not set for conversion of package2.xml to "has" rel + * fix Bug #6077: PEAR_PackageFile_Parser_v2 should return by reference + * fix Bug #6273: pear download-all fails + * fix Bug #6383: incomplete PEAR::Error message on addReplacement() + * fix Bug #6445: PEAR::registerShutdownFunc doesn't work in static calls + * fix Bug #6480: pear install --installroot option fails for pecl packages [timj] + * fix Bug #6510: status active of a maintainer cannot be change + * fix Bug #6537: wrong export compatible v1 dependencies list with exclude limit + * fix Bug #6559: pear should ignore safemode/open_basedir + * fix Bug #6576: PFM2 run in trouble with sessions + * fix Bug #6579: PFM2 changelog and license with uri + * fix Bug #6673: pear install --offline --packagingroot=/blah does not work + * fix Bug #6674: --packagingroot always uses channel pear.php.net configuration + * fix Bug #6675: postinstallscript validation fails + * fix Bug #6690: channel with / will not allow upgrade + * fix Bug #6692: Optional feature install message needs channel name + * fix Bug #6716: "pear install -r" errors after install when + attempting "pear list <pkgname>" + * fix Bug #6735: PEAR_PackageFile::fromTgzFile doesn't work with package.xml + not in root dir + </notes> + </release> + <release> + <version> + <release>1.4.8</release> + <api>1.4.2</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <date>2006-03-05</date> + <license uri="http://www.php.net/license/3_0.txt">PHP License</license> + <notes> + CRITICAL BUGFIX RELEASE + + Channels with "-" in their name were suddenly invalid, and + caused crashes in many places due to improper error handling + * fix Bug #6960: channels are not allowed to have "-" in their name + * fix critical Bug #6969: PEAR list-upgrades crashes + * fix Bug #6991: Class 'PEAR_PackageFile_v1' not found in Registry.php at line 1657 + * fix Bug #7008: PEAR_Frontend::setFrontendObject doesn't set the object + * fix Bug #7015: install a package.tgz with unknown channel, fatal error in PEAR/Registry.php + * fix Bug #7020: tests/PEAR_Registry/api1_1/test_getChannelValidator.phpt crashes PEAR + </notes> + </release> + <release> + <version> + <release>1.4.9</release> + <api>1.4.2</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <date>2006-03-29</date> + <license uri="http://www.php.net/license">PHP License</license> + <notes> + CRITICAL BUGFIX RELEASE + users upgrading from PEAR 1.3.x cannot upgrade to 1.4.8 + users who use --packagingroot may find that installation fails + * fix Bug #7093: if pear channel does not exist, it cannot be retrieved + * fix Bug #7165: warnings in pear + * fix Bug #7075: PEAR_PackageFile_v2 :: setLogger failed on autodetection + </notes> + </release> + </changelog> +</package> http://cvs.php.net/viewcvs.cgi/pear-core/PEAR/RunTest.php?r1=1.22&r2=1.23&diff_format=u Index: pear-core/PEAR/RunTest.php diff -u pear-core/PEAR/RunTest.php:1.22 pear-core/PEAR/RunTest.php:1.23 --- pear-core/PEAR/RunTest.php:1.22 Tue Mar 28 04:56:06 2006 +++ pear-core/PEAR/RunTest.php Tue Mar 28 05:33:42 2006 @@ -1,447 +1,447 @@ -<?php -/** - * PEAR_RunTest - * - * PHP versions 4 and 5 - * - * LICENSE: This source file is subject to version 3.0 of the PHP license - * that is available through the world-wide-web at the following URI: - * http://www.php.net/license/3_0.txt. If you did not receive a copy of - * the PHP License and are unable to obtain it through the web, please - * send a note to license@php.net so we can mail you a copy immediately. - * - * @category pear - * @package PEAR - * @author Tomas V.V.Cox <cox@idecnet.com> - * @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: RunTest.php,v 1.22 2006/03/28 04:56:06 cellog Exp $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.3.3 - */ - -/** - * for error handling - */ -require_once 'PEAR.php'; -require_once 'PEAR/Config.php'; - -define('DETAILED', 1); -putenv("PHP_PEAR_RUNTESTS=1"); - -/** - * Simplified version of PHP's test suite - * - * Try it with: - * - * $ php -r 'include "../PEAR/RunTest.php"; $t=new PEAR_RunTest; $o=$t->run("./pear_system.phpt");print_r($o);' - * - * - * @category pear - * @package PEAR - * @author Tomas V.V.Cox <cox@idecnet.com> - * @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 Release: @package_version@ - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.3.3 - */ -class PEAR_RunTest -{ - var $_logger; - var $_options; - - /** - * An object that supports the PEAR_Common->log() signature, or null - * @param PEAR_Common|null - */ - 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; - } - - // - // Run an individual test case. - // - - function run($file, $ini_settings = '') - { - $cwd = getcwd(); - $conf = &PEAR_Config::singleton(); - $php = $conf->get('php_bin'); - if (isset($this->_options['phpunit'])) { - $cmd = "$php$ini_settings -f $file"; - if (isset($this->_logger)) { - $this->_logger->log(2, 'Running command "' . $cmd . '"'); - } - - $savedir = getcwd(); // in case the test moves us around - chdir(dirname($file)); - echo `$cmd`; - chdir($savedir); - return 'PASSED'; // we have no way of knowing this information so assume passing - } - //var_dump($php);exit; - global $log_format, $info_params, $ini_overwrites; - - $info_params = ''; - $log_format = 'LEOD'; - - // Load the sections of the test file. - $section_text = array( - 'TEST' => '(unnamed test)', - 'SKIPIF' => '', - 'GET' => '', - 'ARGS' => '', - 'CLEAN' => '', - ); - - $file = realpath($file); - if (!is_file($file) || !$fp = fopen($file, "r")) { - return PEAR::raiseError("Cannot open test file: $file"); - } - - $section = ''; - while (!feof($fp)) { - $line = fgets($fp); - - // Match the beginning of a section. - if (ereg('^--([A-Z]+)--',$line,$r)) { - $section = $r[1]; - $section_text[$section] = ''; - continue; - } elseif (empty($section)) { - fclose($fp); - return PEAR::raiseError("Invalid sections formats in test file: $file"); - } - - // Add to the section text. - $section_text[$section] .= $line; - } - fclose($fp); - - $shortname = str_replace($cwd . DIRECTORY_SEPARATOR, '', $file); - if (!isset($this->_options['simple'])) { - $tested = trim($section_text['TEST']) . "[$shortname]"; - } else { - $tested = trim($section_text['TEST']) . ' '; - } - - $tmp = realpath(dirname($file)); - $tmp_skipif = $tmp . uniqid('/phpt.'); - $tmp_file = ereg_replace('\.phpt$','.php',$file); - $tmp_post = $tmp . uniqid('/phpt.'); - - if (file_exists($tmp_skipif)) { - unlink($tmp_skipif); - } - if (file_exists($tmp_file)) { - unlink($tmp_file); - } - if (file_exists($tmp_post)) { - unlink($tmp_post); - } - - // unlink old test results - if (file_exists(ereg_replace('\.phpt$','.diff',$file))) { - unlink(ereg_replace('\.phpt$','.diff',$file)); - } - if (file_exists(ereg_replace('\.phpt$','.log',$file))) { - unlink(ereg_replace('\.phpt$','.log',$file)); - } - if (file_exists(ereg_replace('\.phpt$','.exp',$file))) { - unlink(ereg_replace('\.phpt$','.exp',$file)); - } - if (file_exists(ereg_replace('\.phpt$','.out',$file))) { - unlink(ereg_replace('\.phpt$','.out',$file)); - } - - // Check if test should be skipped. - $info = ''; - $warn = false; - if (array_key_exists('SKIPIF', $section_text)) { - if (trim($section_text['SKIPIF'])) { - $this->save_text($tmp_skipif, $section_text['SKIPIF']); - //$extra = substr(PHP_OS, 0, 3) !== "WIN" ? - // "unset REQUEST_METHOD;": ""; - - //$output = `$extra $php $info_params -f $tmp_skipif`; - $output = `$php $info_params -f $tmp_skipif`; - unlink($tmp_skipif); - if (eregi("^skip", trim($output))) { - $skipreason = "SKIP $tested"; - $reason = (eregi("^skip[[:space:]]*(.+)\$", trim($output))) ? eregi_replace("^skip[[:space:]]*(.+)\$", "\\1", trim($output)) : FALSE; - if ($reason) { - $skipreason .= " (reason: $reason)"; - } - if (!isset($this->_options['quiet'])) { - $this->_logger->log(0, $skipreason); - } - if (isset($old_php)) { - $php = $old_php; - } - if (isset($this->_options['tapoutput'])) { - return array('ok', ' # skip ' . $reason); - } - return 'SKIPPED'; - } - if (eregi("^info", trim($output))) { - $reason = (ereg("^info[[:space:]]*(.+)\$", trim($output))) ? ereg_replace("^info[[:space:]]*(.+)\$", "\\1", trim($output)) : FALSE; - if ($reason) { - $info = " (info: $reason)"; - } - } - if (eregi("^warn", trim($output))) { - $reason = (ereg("^warn[[:space:]]*(.+)\$", trim($output))) ? ereg_replace("^warn[[:space:]]*(.+)\$", "\\1", trim($output)) : FALSE; - if ($reason) { - $warn = true; /* only if there is a reason */ - $info = " (warn: $reason)"; - } - } - } - } - - // We've satisfied the preconditions - run the test! - $this->save_text($tmp_file,$section_text['FILE']); - - $args = $section_text['ARGS'] ? ' -- '.$section_text['ARGS'] : ''; - - $cmd = "$php$ini_settings -f $tmp_file$args 2>&1"; - if (isset($this->_logger)) { - $this->_logger->log(2, 'Running command "' . $cmd . '"'); - } - - $savedir = getcwd(); // in case the test moves us around - if (isset($section_text['RETURNS'])) { - ob_start(); - system($cmd, $return_value); - $out = ob_get_contents(); - ob_end_clean(); - if (file_exists($tmp_post)) { - unlink($tmp_post); - } - $section_text['RETURNS'] = (int) trim($section_text['RETURNS']); - $returnfail = ($return_value != $section_text['RETURNS']); - } else { - $out = `$cmd`; - $returnfail = false; - } - chdir($savedir); - - if ($section_text['CLEAN']) { - // perform test cleanup - $this->save_text($clean = $tmp . uniqid('/phpt.'), $section_text['CLEAN']); - `$php $clean`; - if (file_exists($clean)) { - unlink($clean); - } - } - // Does the output match what is expected? - $output = trim($out); - $output = preg_replace('/\r\n/', "\n", $output); - - if (isset($section_text['EXPECTF']) || isset($section_text['EXPECTREGEX'])) { - if (isset($section_text['EXPECTF'])) { - $wanted = trim($section_text['EXPECTF']); - } else { - $wanted = trim($section_text['EXPECTREGEX']); - } - $wanted_re = preg_replace('/\r\n/',"\n",$wanted); - if (isset($section_text['EXPECTF'])) { - $wanted_re = preg_quote($wanted_re, '/'); - // Stick to basics - $wanted_re = str_replace("%s", ".+?", $wanted_re); //not greedy - $wanted_re = str_replace("%i", "[+\-]?[0-9]+", $wanted_re); - $wanted_re = str_replace("%d", "[0-9]+", $wanted_re); - $wanted_re = str_replace("%x", "[0-9a-fA-F]+", $wanted_re); - $wanted_re = str_replace("%f", "[+\-]?\.?[0-9]+\.?[0-9]*(E-?[0-9]+)?", $wanted_re); - $wanted_re = str_replace("%c", ".", $wanted_re); - // %f allows two points "-.0.0" but that is the best *simple* expression - } - /* DEBUG YOUR REGEX HERE - var_dump($wanted_re); - print(str_repeat('=', 80) . "\n"); - var_dump($output); - */ - if (!$returnfail && preg_match("/^$wanted_re\$/s", $output)) { - if (file_exists($tmp_file)) { - unlink($tmp_file); - } - if (!isset($this->_options['quiet'])) { - $this->_logger->log(0, "PASS $tested$info"); - } - if (isset($old_php)) { - $php = $old_php; - } - if (isset($this->_options['tapoutput'])) { - return array('ok', ' - ' . $tested); - } - return 'PASSED'; - } - - } else { - $wanted = trim($section_text['EXPECT']); - $wanted = preg_replace('/\r\n/',"\n",$wanted); - // compare and leave on success - $ok = (0 == strcmp($output,$wanted)); - if (!$returnfail && $ok) { - if (file_exists($tmp_file)) { - unlink($tmp_file); - } - if (!isset($this->_options['quiet'])) { - $this->_logger->log(0, "PASS $tested$info"); - } - if (isset($old_php)) { - $php = $old_php; - } - if (isset($this->_options['tapoutput'])) { - return array('ok', ' - ' . $tested); - } - return 'PASSED'; - } - } - - // Test failed so we need to report details. - if ($warn) { - $this->_logger->log(0, "WARN $tested$info"); - } else { - $this->_logger->log(0, "FAIL $tested$info"); - } - - if (isset($section_text['RETURNS'])) { - $GLOBALS['__PHP_FAILED_TESTS__'][] = array( - 'name' => $file, - 'test_name' => $tested, - 'output' => ereg_replace('\.phpt$','.log', $file), - 'diff' => ereg_replace('\.phpt$','.diff', $file), - 'info' => $info, - 'return' => $return_value - ); - } else { - $GLOBALS['__PHP_FAILED_TESTS__'][] = array( - 'name' => $file, - 'test_name' => $tested, - 'output' => ereg_replace('\.phpt$','.log', $file), - 'diff' => ereg_replace('\.phpt$','.diff', $file), - 'info' => $info, - ); - } - - // write .exp - if (strpos($log_format,'E') !== FALSE) { - $logname = ereg_replace('\.phpt$','.exp',$file); - if (!$log = fopen($logname,'w')) { - return PEAR::raiseError("Cannot create test log - $logname"); - } - fwrite($log,$wanted); - fclose($log); - } - - // write .out - if (strpos($log_format,'O') !== FALSE) { - $logname = ereg_replace('\.phpt$','.out',$file); - if (!$log = fopen($logname,'w')) { - return PEAR::raiseError("Cannot create test log - $logname"); - } - fwrite($log,$output); - fclose($log); - } - - // write .diff - if (strpos($log_format,'D') !== FALSE) { - $logname = ereg_replace('\.phpt$','.diff',$file); - if (!$log = fopen($logname,'w')) { - return PEAR::raiseError("Cannot create test log - $logname"); - } - fwrite($log, $this->generate_diff($wanted, $output, - isset($section_text['RETURNS']) ? array(trim($section_text['RETURNS']), - $return_value) : null)); - fclose($log); - } - - // write .log - if (strpos($log_format,'L') !== FALSE) { - $logname = ereg_replace('\.phpt$','.log',$file); - if (!$log = fopen($logname,'w')) { - return PEAR::raiseError("Cannot create test log - $logname"); - } - fwrite($log," ----- EXPECTED OUTPUT -$wanted ----- ACTUAL OUTPUT -$output ----- FAILED -"); - if ($returnfail) { - fwrite($log," ----- EXPECTED RETURN -$section_text[RETURNS] ----- ACTUAL RETURN -$return_value -"); - } - fclose($log); - //error_report($file,$logname,$tested); - } - - if (isset($old_php)) { - $php = $old_php; - } - - if (isset($this->_options['tapoutput'])) { - $wanted = explode("\n", $wanted); - $wanted = "# Expected output:\n#\n#" . implode("\n#", $wanted); - $output = explode("\n", $output); - $output = "#\n#\n# Actual output:\n#\n#" . implode("\n#", $output); - return array($wanted . $output . 'not ok', ' - ' . $tested); - } - return $warn ? 'WARNED' : 'FAILED'; - } - - function generate_diff($wanted, $output, $return_value) - { - $w = explode("\n", $wanted); - $o = explode("\n", $output); - $w1 = array_diff_assoc($w,$o); - $o1 = array_diff_assoc($o,$w); - $w2 = array(); - $o2 = array(); - foreach($w1 as $idx => $val) $w2[sprintf("%03d<",$idx)] = sprintf("%03d- ", $idx+1).$val; - foreach($o1 as $idx => $val) $o2[sprintf("%03d>",$idx)] = sprintf("%03d+ ", $idx+1).$val; - $diff = array_merge($w2, $o2); - ksort($diff); - if ($return_value) { - $extra = "##EXPECTED: $return_value[0]\r\n##RETURNED: $return_value[1]"; - } else { - $extra = ''; - } - return implode("\r\n", $diff) . $extra; - } - - // - // Write the given text to a temporary file, and return the filename. - // - - function save_text($filename, $text) - { - if (!$fp = fopen($filename, 'w')) { - return PEAR::raiseError("Cannot open file '" . $filename . "' (save_text)"); - } - fwrite($fp,$text); - fclose($fp); - if (1 < DETAILED) echo " -FILE $filename {{{ -$text -}}} -"; - } - -} -?> +<?php +/** + * PEAR_RunTest + * + * PHP versions 4 and 5 + * + * LICENSE: This source file is subject to version 3.0 of the PHP license + * that is available through the world-wide-web at the following URI: + * http://www.php.net/license/3_0.txt. If you did not receive a copy of + * the PHP License and are unable to obtain it through the web, please + * send a note to license@php.net so we can mail you a copy immediately. + * + * @category pear + * @package PEAR + * @author Tomas V.V.Cox <cox@idecnet.com> + * @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: RunTest.php,v 1.23 2006/03/28 05:33:42 cellog Exp $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.3.3 + */ + +/** + * for error handling + */ +require_once 'PEAR.php'; +require_once 'PEAR/Config.php'; + +define('DETAILED', 1); +putenv("PHP_PEAR_RUNTESTS=1"); + +/** + * Simplified version of PHP's test suite + * + * Try it with: + * + * $ php -r 'include "../PEAR/RunTest.php"; $t=new PEAR_RunTest; $o=$t->run("./pear_system.phpt");print_r($o);' + * + * + * @category pear + * @package PEAR + * @author Tomas V.V.Cox <cox@idecnet.com> + * @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 Release: @package_version@ + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.3.3 + */ +class PEAR_RunTest +{ + var $_logger; + var $_options; + + /** + * An object that supports the PEAR_Common->log() signature, or null + * @param PEAR_Common|null + */ + 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; + } + + // + // Run an individual test case. + // + + function run($file, $ini_settings = '') + { + $cwd = getcwd(); + $conf = &PEAR_Config::singleton(); + $php = $conf->get('php_bin'); + if (isset($this->_options['phpunit'])) { + $cmd = "$php$ini_settings -f $file"; + if (isset($this->_logger)) { + $this->_logger->log(2, 'Running command "' . $cmd . '"'); + } + + $savedir = getcwd(); // in case the test moves us around + chdir(dirname($file)); + echo `$cmd`; + chdir($savedir); + return 'PASSED'; // we have no way of knowing this information so assume passing + } + //var_dump($php);exit; + global $log_format, $info_params, $ini_overwrites; + + $info_params = ''; + $log_format = 'LEOD'; + + // Load the sections of the test file. + $section_text = array( + 'TEST' => '(unnamed test)', + 'SKIPIF' => '', + 'GET' => '', + 'ARGS' => '', + 'CLEAN' => '', + ); + + $file = realpath($file); + if (!is_file($file) || !$fp = fopen($file, "r")) { + return PEAR::raiseError("Cannot open test file: $file"); + } + + $section = ''; + while (!feof($fp)) { + $line = fgets($fp); + + // Match the beginning of a section. + if (ereg('^--([A-Z]+)--',$line,$r)) { + $section = $r[1]; + $section_text[$section] = ''; + continue; + } elseif (empty($section)) { + fclose($fp); + return PEAR::raiseError("Invalid sections formats in test file: $file"); + } + + // Add to the section text. + $section_text[$section] .= $line; + } + fclose($fp); + + $shortname = str_replace($cwd . DIRECTORY_SEPARATOR, '', $file); + if (!isset($this->_options['simple'])) { + $tested = trim($section_text['TEST']) . "[$shortname]"; + } else { + $tested = trim($section_text['TEST']) . ' '; + } + + $tmp = realpath(dirname($file)); + $tmp_skipif = $tmp . uniqid('/phpt.'); + $tmp_file = ereg_replace('\.phpt$','.php',$file); + $tmp_post = $tmp . uniqid('/phpt.'); + + if (file_exists($tmp_skipif)) { + unlink($tmp_skipif); + } + if (file_exists($tmp_file)) { + unlink($tmp_file); + } + if (file_exists($tmp_post)) { + unlink($tmp_post); + } + + // unlink old test results + if (file_exists(ereg_replace('\.phpt$','.diff',$file))) { + unlink(ereg_replace('\.phpt$','.diff',$file)); + } + if (file_exists(ereg_replace('\.phpt$','.log',$file))) { + unlink(ereg_replace('\.phpt$','.log',$file)); + } + if (file_exists(ereg_replace('\.phpt$','.exp',$file))) { + unlink(ereg_replace('\.phpt$','.exp',$file)); + } + if (file_exists(ereg_replace('\.phpt$','.out',$file))) { + unlink(ereg_replace('\.phpt$','.out',$file)); + } + + // Check if test should be skipped. + $info = ''; + $warn = false; + if (array_key_exists('SKIPIF', $section_text)) { + if (trim($section_text['SKIPIF'])) { + $this->save_text($tmp_skipif, $section_text['SKIPIF']); + //$extra = substr(PHP_OS, 0, 3) !== "WIN" ? + // "unset REQUEST_METHOD;": ""; + + //$output = `$extra $php $info_params -f $tmp_skipif`; + $output = `$php $info_params -f $tmp_skipif`; + unlink($tmp_skipif); + if (eregi("^skip", trim($output))) { + $skipreason = "SKIP $tested"; + $reason = (eregi("^skip[[:space:]]*(.+)\$", trim($output))) ? eregi_replace("^skip[[:space:]]*(.+)\$", "\\1", trim($output)) : FALSE; + if ($reason) { + $skipreason .= " (reason: $reason)"; + } + if (!isset($this->_options['quiet'])) { + $this->_logger->log(0, $skipreason); + } + if (isset($old_php)) { + $php = $old_php; + } + if (isset($this->_options['tapoutput'])) { + return array('ok', ' # skip ' . $reason); + } + return 'SKIPPED'; + } + if (eregi("^info", trim($output))) { + $reason = (ereg("^info[[:space:]]*(.+)\$", trim($output))) ? ereg_replace("^info[[:space:]]*(.+)\$", "\\1", trim($output)) : FALSE; + if ($reason) { + $info = " (info: $reason)"; + } + } + if (eregi("^warn", trim($output))) { + $reason = (ereg("^warn[[:space:]]*(.+)\$", trim($output))) ? ereg_replace("^warn[[:space:]]*(.+)\$", "\\1", trim($output)) : FALSE; + if ($reason) { + $warn = true; /* only if there is a reason */ + $info = " (warn: $reason)"; + } + } + } + } + + // We've satisfied the preconditions - run the test! + $this->save_text($tmp_file,$section_text['FILE']); + + $args = $section_text['ARGS'] ? ' -- '.$section_text['ARGS'] : ''; + + $cmd = "$php$ini_settings -f $tmp_file$args 2>&1"; + if (isset($this->_logger)) { + $this->_logger->log(2, 'Running command "' . $cmd . '"'); + } + + $savedir = getcwd(); // in case the test moves us around + if (isset($section_text['RETURNS'])) { + ob_start(); + system($cmd, $return_value); + $out = ob_get_contents(); + ob_end_clean(); + if (file_exists($tmp_post)) { + unlink($tmp_post); + } + $section_text['RETURNS'] = (int) trim($section_text['RETURNS']); + $returnfail = ($return_value != $section_text['RETURNS']); + } else { + $out = `$cmd`; + $returnfail = false; + } + chdir($savedir); + + if ($section_text['CLEAN']) { + // perform test cleanup + $this->save_text($clean = $tmp . uniqid('/phpt.'), $section_text['CLEAN']); + `$php $clean`; + if (file_exists($clean)) { + unlink($clean); + } + } + // Does the output match what is expected? + $output = trim($out); + $output = preg_replace('/\r\n/', "\n", $output); + + if (isset($section_text['EXPECTF']) || isset($section_text['EXPECTREGEX'])) { + if (isset($section_text['EXPECTF'])) { + $wanted = trim($section_text['EXPECTF']); + } else { + $wanted = trim($section_text['EXPECTREGEX']); + } + $wanted_re = preg_replace('/\r\n/',"\n",$wanted); + if (isset($section_text['EXPECTF'])) { + $wanted_re = preg_quote($wanted_re, '/'); + // Stick to basics + $wanted_re = str_replace("%s", ".+?", $wanted_re); //not greedy + $wanted_re = str_replace("%i", "[+\-]?[0-9]+", $wanted_re); + $wanted_re = str_replace("%d", "[0-9]+", $wanted_re); + $wanted_re = str_replace("%x", "[0-9a-fA-F]+", $wanted_re); + $wanted_re = str_replace("%f", "[+\-]?\.?[0-9]+\.?[0-9]*(E-?[0-9]+)?", $wanted_re); + $wanted_re = str_replace("%c", ".", $wanted_re); + // %f allows two points "-.0.0" but that is the best *simple* expression + } + /* DEBUG YOUR REGEX HERE + var_dump($wanted_re); + print(str_repeat('=', 80) . "\n"); + var_dump($output); + */ + if (!$returnfail && preg_match("/^$wanted_re\$/s", $output)) { + if (file_exists($tmp_file)) { + unlink($tmp_file); + } + if (!isset($this->_options['quiet'])) { + $this->_logger->log(0, "PASS $tested$info"); + } + if (isset($old_php)) { + $php = $old_php; + } + if (isset($this->_options['tapoutput'])) { + return array('ok', ' - ' . $tested); + } + return 'PASSED'; + } + + } else { + $wanted = trim($section_text['EXPECT']); + $wanted = preg_replace('/\r\n/',"\n",$wanted); + // compare and leave on success + $ok = (0 == strcmp($output,$wanted)); + if (!$returnfail && $ok) { + if (file_exists($tmp_file)) { + unlink($tmp_file); + } + if (!isset($this->_options['quiet'])) { + $this->_logger->log(0, "PASS $tested$info"); + } + if (isset($old_php)) { + $php = $old_php; + } + if (isset($this->_options['tapoutput'])) { + return array('ok', ' - ' . $tested); + } + return 'PASSED'; + } + } + + // Test failed so we need to report details. + if ($warn) { + $this->_logger->log(0, "WARN $tested$info"); + } else { + $this->_logger->log(0, "FAIL $tested$info"); + } + + if (isset($section_text['RETURNS'])) { + $GLOBALS['__PHP_FAILED_TESTS__'][] = array( + 'name' => $file, + 'test_name' => $tested, + 'output' => ereg_replace('\.phpt$','.log', $file), + 'diff' => ereg_replace('\.phpt$','.diff', $file), + 'info' => $info, + 'return' => $return_value + ); + } else { + $GLOBALS['__PHP_FAILED_TESTS__'][] = array( + 'name' => $file, + 'test_name' => $tested, + 'output' => ereg_replace('\.phpt$','.log', $file), + 'diff' => ereg_replace('\.phpt$','.diff', $file), + 'info' => $info, + ); + } + + // write .exp + if (strpos($log_format,'E') !== FALSE) { + $logname = ereg_replace('\.phpt$','.exp',$file); + if (!$log = fopen($logname,'w')) { + return PEAR::raiseError("Cannot create test log - $logname"); + } + fwrite($log,$wanted); + fclose($log); + } + + // write .out + if (strpos($log_format,'O') !== FALSE) { + $logname = ereg_replace('\.phpt$','.out',$file); + if (!$log = fopen($logname,'w')) { + return PEAR::raiseError("Cannot create test log - $logname"); + } + fwrite($log,$output); + fclose($log); + } + + // write .diff + if (strpos($log_format,'D') !== FALSE) { + $logname = ereg_replace('\.phpt$','.diff',$file); + if (!$log = fopen($logname,'w')) { + return PEAR::raiseError("Cannot create test log - $logname"); + } + fwrite($log, $this->generate_diff($wanted, $output, + isset($section_text['RETURNS']) ? array(trim($section_text['RETURNS']), + $return_value) : null)); + fclose($log); + } + + // write .log + if (strpos($log_format,'L') !== FALSE) { + $logname = ereg_replace('\.phpt$','.log',$file); + if (!$log = fopen($logname,'w')) { + return PEAR::raiseError("Cannot create test log - $logname"); + } + fwrite($log," +---- EXPECTED OUTPUT +$wanted +---- ACTUAL OUTPUT +$output +---- FAILED +"); + if ($returnfail) { + fwrite($log," +---- EXPECTED RETURN +$section_text[RETURNS] +---- ACTUAL RETURN +$return_value +"); + } + fclose($log); + //error_report($file,$logname,$tested); + } + + if (isset($old_php)) { + $php = $old_php; + } + + if (isset($this->_options['tapoutput'])) { + $wanted = explode("\n", $wanted); + $wanted = "# Expected output:\n#\n#" . implode("\n#", $wanted); + $output = explode("\n", $output); + $output = "#\n#\n# Actual output:\n#\n#" . implode("\n#", $output); + return array($wanted . $output . 'not ok', ' - ' . $tested); + } + return $warn ? 'WARNED' : 'FAILED'; + } + + function generate_diff($wanted, $output, $return_value) + { + $w = explode("\n", $wanted); + $o = explode("\n", $output); + $w1 = array_diff_assoc($w,$o); + $o1 = array_diff_assoc($o,$w); + $w2 = array(); + $o2 = array(); + foreach($w1 as $idx => $val) $w2[sprintf("%03d<",$idx)] = sprintf("%03d- ", $idx+1).$val; + foreach($o1 as $idx => $val) $o2[sprintf("%03d>",$idx)] = sprintf("%03d+ ", $idx+1).$val; + $diff = array_merge($w2, $o2); + ksort($diff); + if ($return_value) { + $extra = "##EXPECTED: $return_value[0]\r\n##RETURNED: $return_value[1]"; + } else { + $extra = ''; + } + return implode("\r\n", $diff) . $extra; + } + + // + // Write the given text to a temporary file, and return the filename. + // + + function save_text($filename, $text) + { + if (!$fp = fopen($filename, 'w')) { + return PEAR::raiseError("Cannot open file '" . $filename . "' (save_text)"); + } + fwrite($fp,$text); + fclose($fp); + if (1 < DETAILED) echo " +FILE $filename {{{ +$text +}}} +"; + } + +} +?> http://cvs.php.net/viewcvs.cgi/pear-core/PEAR/Command/Test.php?r1=1.11&r2=1.12&diff_format=u Index: pear-core/PEAR/Command/Test.php diff -u pear-core/PEAR/Command/Test.php:1.11 pear-core/PEAR/Command/Test.php:1.12 --- pear-core/PEAR/Command/Test.php:1.11 Tue Mar 28 04:56:06 2006 +++ pear-core/PEAR/Command/Test.php Tue Mar 28 05:33:42 2006 @@ -1,303 +1,303 @@ -<?php -/** - * PEAR_Command_Test (run-tests) - * - * PHP versions 4 and 5 - * - * LICENSE: This source file is subject to version 3.0 of the PHP license - * that is available through the world-wide-web at the following URI: - * http://www.php.net/license/3_0.txt. If you did not receive a copy of - * the PHP License and are unable to obtain it through the web, please - * send a note to license@php.net so we can mail you a copy immediately. - * - * @category pear - * @package PEAR - * @author Stig Bakken <ssb@php.net> - * @author Martin Jansen <mj@php.net> - * @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: Test.php,v 1.11 2006/03/28 04:56:06 cellog Exp $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 0.1 - */ - -/** - * base class - */ -require_once 'PEAR/Command/Common.php'; - -/** - * PEAR commands for login/logout - * - * @category pear - * @package PEAR - * @author Stig Bakken <ssb@php.net> - * @author Martin Jansen <mj@php.net> - * @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 Release: @package_version@ - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 0.1 - */ - -class PEAR_Command_Test extends PEAR_Command_Common -{ - // {{{ properties - - var $commands = array( - 'run-tests' => array( - 'summary' => 'Run Regression Tests', - 'function' => 'doRunTests', - 'shortcut' => 'rt', - 'options' => array( - 'recur' => array( - 'shortopt' => 'r', - 'doc' => 'Run tests in child directories, recursively. 4 dirs deep maximum', - ), - 'ini' => array( - 'shortopt' => 'i', - 'doc' => 'actual string of settings to pass to php in format " -d setting=blah"', - 'arg' => 'SETTINGS' - ), - 'realtimelog' => array( - 'shortopt' => 'l', - 'doc' => 'Log test runs/results as they are run', - ), - 'quiet' => array( - 'shortopt' => 'q', - 'doc' => 'Only display detail for failed tests', - ), - 'simple' => array( - 'shortopt' => 's', - 'doc' => 'Display simple output for all tests', - ), - 'package' => array( - 'shortopt' => 'p', - 'doc' => 'Treat parameters as installed packages from which to run tests', - ), - 'phpunit' => array( - 'shortopt' => 'u', - 'doc' => 'Search parameters for AllTests.php, and use that to run phpunit-based tests', - ), - 'tapoutput' => array( - 'shortopt' => 't', - 'doc' => 'Output run-tests.log in TAP-compliant format', - ), - ), - 'doc' => '[testfile|dir ...] -Run regression tests with PHP\'s regression testing script (run-tests.php).', - ), - ); - - var $output; - - // }}} - // {{{ constructor - - /** - * PEAR_Command_Test constructor. - * - * @access public - */ - function PEAR_Command_Test(&$ui, &$config) - { - parent::PEAR_Command_Common($ui, $config); - } - - // }}} - // {{{ doRunTests() - - function doRunTests($command, $options, $params) - { - if (isset($options['phpunit']) && isset($options['tapoutput'])) { - return $this->raiseError('ERROR: cannot use both --phpunit and --tapoutput at the same time'); - } - 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); - $tests = array(); - if (isset($options['recur'])) { - $depth = 4; - } else { - $depth = 1; - } - if (!count($params)) { - $params[] = '.'; - } - if (isset($options['package'])) { - $oldparams = $params; - $params = array(); - $reg = &$this->config->getRegistry(); - foreach ($oldparams as $param) { - $pname = $reg->parsePackageName($param, $this->config->get('default_channel')); - if (PEAR::isError($pname)) { - return $this->raiseError($pname); - } - $package = &$reg->getPackage($pname['package'], $pname['channel']); - if (!$package) { - return PEAR::raiseError('Unknown package "' . - $reg->parsedPackageNameToString($pname) . '"'); - } - $filelist = $package->getFilelist(); - foreach ($filelist as $name => $atts) { - if (isset($atts['role']) && $atts['role'] != 'test') { - continue; - } - if (isset($options['phpunit'])) { - if (!preg_match('/AllTests\.php$/i', $name)) { - continue; - } - } else { - if (!preg_match('/\.phpt$/', $name)) { - continue; - } - } - $params[] = $atts['installed_as']; - } - } - } - foreach ($params as $p) { - if (is_dir($p)) { - if (isset($options['phpunit'])) { - $dir = System::find(array($p, '-type', 'f', - '-maxdepth', $depth, - '-name', 'AllTests.php')); - } else { - $dir = System::find(array($p, '-type', 'f', - '-maxdepth', $depth, - '-name', '*.phpt')); - } - $tests = array_merge($tests, $dir); - } else { - if (isset($options['phpunit'])) { - if (!preg_match('/AllTests\.php$/i', $p)) { - continue; - } - $tests[] = $p; - } else { - if (!file_exists($p)) { - if (!preg_match('/\.phpt$/', $p)) { - $p .= '.phpt'; - } - $dir = System::find(array(dirname($p), '-type', 'f', - '-maxdepth', $depth, - '-name', $p)); - $tests = array_merge($tests, $dir); - } else { - $tests[] = $p; - } - } - } - } - $ini_settings = ''; - if (isset($options['ini'])) { - $ini_settings .= $options['ini']; - } - if (isset($_ENV['TEST_PHP_INCLUDE_PATH'])) { - $ini_settings .= " -d include_path={$_ENV['TEST_PHP_INCLUDE_PATH']}"; - } - if ($ini_settings) { - $this->ui->outputData('Using INI settings: "' . $ini_settings . '"'); - } - $skipped = $passed = $failed = array(); - $this->ui->outputData('Running ' . count($tests) . ' tests', $command); - $start = time(); - if (isset($options['realtimelog'])) { - if (file_exists('run-tests.log')) { - unlink('run-tests.log'); - } - } - if (isset($options['tapoutput'])) { - $tap = '1..' . count($tests) . "\n"; - } - $i = 1; - foreach ($tests as $t) { - if (isset($options['realtimelog'])) { - $fp = @fopen('run-tests.log', 'a'); - if ($fp) { - fwrite($fp, "Running test $t..."); - fclose($fp); - } - } - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $result = $run->run($t, $ini_settings); - PEAR::staticPopErrorHandling(); - if (PEAR::isError($result)) { - $this->ui->log(0, $result->getMessage()); - continue; - } - if (isset($options['tapoutput'])) { - $tap .= $result[0] . ' ' . $i . $result[1] . "\n"; - $i++; - continue; - } - if (isset($options['realtimelog'])) { - $fp = @fopen('run-tests.log', 'a'); - if ($fp) { - fwrite($fp, "$result\n"); - fclose($fp); - } - } - if ($result == 'FAILED') { - $failed[] = $t; - } - if ($result == 'PASSED') { - $passed[] = $t; - } - if ($result == 'SKIPPED') { - $skipped[] = $t; - } - } - $total = date('i:s', time() - $start); - if (isset($options['tapoutput'])) { - $fp = @fopen('run-tests.log', 'w'); - if ($fp) { - fwrite($fp, $tap, strlen($tap)); - fclose($fp); - $this->ui->outputData('wrote TAP-format log to "' .realpath('run-tests.log') . - '"', $command); - } - } else { - if (count($failed)) { - $output = "TOTAL TIME: $total\n"; - $output .= count($passed) . " PASSED TESTS\n"; - $output .= count($skipped) . " SKIPPED TESTS\n"; - $output .= count($failed) . " FAILED TESTS:\n"; - foreach ($failed as $failure) { - $output .= $failure . "\n"; - } - if (isset($options['realtimelog'])) { - $fp = @fopen('run-tests.log', 'a'); - } else { - $fp = @fopen('run-tests.log', 'w'); - } - if ($fp) { - fwrite($fp, $output, strlen($output)); - fclose($fp); - $this->ui->outputData('wrote log to "' . realpath('run-tests.log') . '"', $command); - } - } elseif (file_exists('run-tests.log') && !is_dir('run-tests.log')) { - @unlink('run-tests.log'); - } - } - $this->ui->outputData('TOTAL TIME: ' . $total); - $this->ui->outputData(count($passed) . ' PASSED TESTS', $command); - $this->ui->outputData(count($skipped) . ' SKIPPED TESTS', $command); - if (count($failed)) { - $this->ui->outputData(count($failed) . ' FAILED TESTS:', $command); - foreach ($failed as $failure) { - $this->ui->outputData($failure, $command); - } - } - - return true; - } - // }}} -} - -?> +<?php +/** + * PEAR_Command_Test (run-tests) + * + * PHP versions 4 and 5 + * + * LICENSE: This source file is subject to version 3.0 of the PHP license + * that is available through the world-wide-web at the following URI: + * http://www.php.net/license/3_0.txt. If you did not receive a copy of + * the PHP License and are unable to obtain it through the web, please + * send a note to license@php.net so we can mail you a copy immediately. + * + * @category pear + * @package PEAR + * @author Stig Bakken <ssb@php.net> + * @author Martin Jansen <mj@php.net> + * @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: Test.php,v 1.12 2006/03/28 05:33:42 cellog Exp $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 0.1 + */ + +/** + * base class + */ +require_once 'PEAR/Command/Common.php'; + +/** + * PEAR commands for login/logout + * + * @category pear + * @package PEAR + * @author Stig Bakken <ssb@php.net> + * @author Martin Jansen <mj@php.net> + * @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 Release: @package_version@ + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 0.1 + */ + +class PEAR_Command_Test extends PEAR_Command_Common +{ + // {{{ properties + + var $commands = array( + 'run-tests' => array( + 'summary' => 'Run Regression Tests', + 'function' => 'doRunTests', + 'shortcut' => 'rt', + 'options' => array( + 'recur' => array( + 'shortopt' => 'r', + 'doc' => 'Run tests in child directories, recursively. 4 dirs deep maximum', + ), + 'ini' => array( + 'shortopt' => 'i', + 'doc' => 'actual string of settings to pass to php in format " -d setting=blah"', + 'arg' => 'SETTINGS' + ), + 'realtimelog' => array( + 'shortopt' => 'l', + 'doc' => 'Log test runs/results as they are run', + ), + 'quiet' => array( + 'shortopt' => 'q', + 'doc' => 'Only display detail for failed tests', + ), + 'simple' => array( + 'shortopt' => 's', + 'doc' => 'Display simple output for all tests', + ), + 'package' => array( + 'shortopt' => 'p', + 'doc' => 'Treat parameters as installed packages from which to run tests', + ), + 'phpunit' => array( + 'shortopt' => 'u', + 'doc' => 'Search parameters for AllTests.php, and use that to run phpunit-based tests', + ), + 'tapoutput' => array( + 'shortopt' => 't', + 'doc' => 'Output run-tests.log in TAP-compliant format', + ), + ), + 'doc' => '[testfile|dir ...] +Run regression tests with PHP\'s regression testing script (run-tests.php).', + ), + ); + + var $output; + + // }}} + // {{{ constructor + + /** + * PEAR_Command_Test constructor. + * + * @access public + */ + function PEAR_Command_Test(&$ui, &$config) + { + parent::PEAR_Command_Common($ui, $config); + } + + // }}} + // {{{ doRunTests() + + function doRunTests($command, $options, $params) + { + if (isset($options['phpunit']) && isset($options['tapoutput'])) { + return $this->raiseError('ERROR: cannot use both --phpunit and --tapoutput at the same time'); + } + 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); + $tests = array(); + if (isset($options['recur'])) { + $depth = 4; + } else { + $depth = 1; + } + if (!count($params)) { + $params[] = '.'; + } + if (isset($options['package'])) { + $oldparams = $params; + $params = array(); + $reg = &$this->config->getRegistry(); + foreach ($oldparams as $param) { + $pname = $reg->parsePackageName($param, $this->config->get('default_channel')); + if (PEAR::isError($pname)) { + return $this->raiseError($pname); + } + $package = &$reg->getPackage($pname['package'], $pname['channel']); + if (!$package) { + return PEAR::raiseError('Unknown package "' . + $reg->parsedPackageNameToString($pname) . '"'); + } + $filelist = $package->getFilelist(); + foreach ($filelist as $name => $atts) { + if (isset($atts['role']) && $atts['role'] != 'test') { + continue; + } + if (isset($options['phpunit'])) { + if (!preg_match('/AllTests\.php$/i', $name)) { + continue; + } + } else { + if (!preg_match('/\.phpt$/', $name)) { + continue; + } + } + $params[] = $atts['installed_as']; + } + } + } + foreach ($params as $p) { + if (is_dir($p)) { + if (isset($options['phpunit'])) { + $dir = System::find(array($p, '-type', 'f', + '-maxdepth', $depth, + '-name', 'AllTests.php')); + } else { + $dir = System::find(array($p, '-type', 'f', + '-maxdepth', $depth, + '-name', '*.phpt')); + } + $tests = array_merge($tests, $dir); + } else { + if (isset($options['phpunit'])) { + if (!preg_match('/AllTests\.php$/i', $p)) { + continue; + } + $tests[] = $p; + } else { + if (!file_exists($p)) { + if (!preg_match('/\.phpt$/', $p)) { + $p .= '.phpt'; + } + $dir = System::find(array(dirname($p), '-type', 'f', + '-maxdepth', $depth, + '-name', $p)); + $tests = array_merge($tests, $dir); + } else { + $tests[] = $p; + } + } + } + } + $ini_settings = ''; + if (isset($options['ini'])) { + $ini_settings .= $options['ini']; + } + if (isset($_ENV['TEST_PHP_INCLUDE_PATH'])) { + $ini_settings .= " -d include_path={$_ENV['TEST_PHP_INCLUDE_PATH']}"; + } + if ($ini_settings) { + $this->ui->outputData('Using INI settings: "' . $ini_settings . '"'); + } + $skipped = $passed = $failed = array(); + $this->ui->outputData('Running ' . count($tests) . ' tests', $command); + $start = time(); + if (isset($options['realtimelog'])) { + if (file_exists('run-tests.log')) { + unlink('run-tests.log'); + } + } + if (isset($options['tapoutput'])) { + $tap = '1..' . count($tests) . "\n"; + } + $i = 1; + foreach ($tests as $t) { + if (isset($options['realtimelog'])) { + $fp = @fopen('run-tests.log', 'a'); + if ($fp) { + fwrite($fp, "Running test $t..."); + fclose($fp); + } + } + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $result = $run->run($t, $ini_settings); + PEAR::staticPopErrorHandling(); + if (PEAR::isError($result)) { + $this->ui->log(0, $result->getMessage()); + continue; + } + if (isset($options['tapoutput'])) { + $tap .= $result[0] . ' ' . $i . $result[1] . "\n"; + $i++; + continue; + } + if (isset($options['realtimelog'])) { + $fp = @fopen('run-tests.log', 'a'); + if ($fp) { + fwrite($fp, "$result\n"); + fclose($fp); + } + } + if ($result == 'FAILED') { + $failed[] = $t; + } + if ($result == 'PASSED') { + $passed[] = $t; + } + if ($result == 'SKIPPED') { + $skipped[] = $t; + } + } + $total = date('i:s', time() - $start); + if (isset($options['tapoutput'])) { + $fp = @fopen('run-tests.log', 'w'); + if ($fp) { + fwrite($fp, $tap, strlen($tap)); + fclose($fp); + $this->ui->outputData('wrote TAP-format log to "' .realpath('run-tests.log') . + '"', $command); + } + } else { + if (count($failed)) { + $output = "TOTAL TIME: $total\n"; + $output .= count($passed) . " PASSED TESTS\n"; + $output .= count($skipped) . " SKIPPED TESTS\n"; + $output .= count($failed) . " FAILED TESTS:\n"; + foreach ($failed as $failure) { + $output .= $failure . "\n"; + } + if (isset($options['realtimelog'])) { + $fp = @fopen('run-tests.log', 'a'); + } else { + $fp = @fopen('run-tests.log', 'w'); + } + if ($fp) { + fwrite($fp, $output, strlen($output)); + fclose($fp); + $this->ui->outputData('wrote log to "' . realpath('run-tests.log') . '"', $command); + } + } elseif (file_exists('run-tests.log') && !is_dir('run-tests.log')) { + @unlink('run-tests.log'); + } + } + $this->ui->outputData('TOTAL TIME: ' . $total); + $this->ui->outputData(count($passed) . ' PASSED TESTS', $command); + $this->ui->outputData(count($skipped) . ' SKIPPED TESTS', $command); + if (count($failed)) { + $this->ui->outputData(count($failed) . ' FAILED TESTS:', $command); + foreach ($failed as $failure) { + $this->ui->outputData($failure, $command); + } + } + + return true; + } + // }}} +} + +?> http://cvs.php.net/viewcvs.cgi/pear-core/PEAR/Command/Test.xml?r1=1.3&r2=1.4&diff_format=u Index: pear-core/PEAR/Command/Test.xml diff -u pear-core/PEAR/Command/Test.xml:1.3 pear-core/PEAR/Command/Test.xml:1.4 --- pear-core/PEAR/Command/Test.xml:1.3 Tue Mar 28 04:56:06 2006 +++ pear-core/PEAR/Command/Test.xml Tue Mar 28 05:33:42 2006 @@ -1,44 +1,44 @@ -<commands version="1.0"> - <run-tests> - <summary>Run Regression Tests</summary> - <function>doRunTests</function> - <shortcut>rt</shortcut> - <options> - <recur> - <shortopt>r</shortopt> - <doc>Run tests in child directories, recursively. 4 dirs deep maximum</doc> - </recur> - <ini> - <shortopt>i</shortopt> - <doc>actual string of settings to pass to php in format " -d setting=blah"</doc> - <arg>SETTINGS</arg> - </ini> - <realtimelog> - <shortopt>l</shortopt> - <doc>Log test runs/results as they are run</doc> - </realtimelog> - <quiet> - <shortopt>q</shortopt> - <doc>Only display detail for failed tests</doc> - </quiet> - <simple> - <shortopt>s</shortopt> - <doc>Display simple output for all tests</doc> - </simple> - <package> - <shortopt>p</shortopt> - <doc>Treat parameters as installed packages from which to run tests</doc> - </package> - <phpunit> - <shortopt>u</shortopt> - <doc>Search parameters for AllTests.php, and use that to run phpunit-based tests</doc> - </phpunit> - <tapoutput> - <shortopt>t</shortopt> - <doc>Output run-tests.log in TAP-compliant format</doc> - </tapoutput> - </options> - <doc>[testfile|dir ...] -Run regression tests with PHP's regression testing script (run-tests.php).</doc> - </run-tests> +<commands version="1.0"> + <run-tests> + <summary>Run Regression Tests</summary> + <function>doRunTests</function> + <shortcut>rt</shortcut> + <options> + <recur> + <shortopt>r</shortopt> + <doc>Run tests in child directories, recursively. 4 dirs deep maximum</doc> + </recur> + <ini> + <shortopt>i</shortopt> + <doc>actual string of settings to pass to php in format " -d setting=blah"</doc> + <arg>SETTINGS</arg> + </ini> + <realtimelog> + <shortopt>l</shortopt> + <doc>Log test runs/results as they are run</doc> + </realtimelog> + <quiet> + <shortopt>q</shortopt> + <doc>Only display detail for failed tests</doc> + </quiet> + <simple> + <shortopt>s</shortopt> + <doc>Display simple output for all tests</doc> + </simple> + <package> + <shortopt>p</shortopt> + <doc>Treat parameters as installed packages from which to run tests</doc> + </package> + <phpunit> + <shortopt>u</shortopt> + <doc>Search parameters for AllTests.php, and use that to run phpunit-based tests</doc> + </phpunit> + <tapoutput> + <shortopt>t</shortopt> + <doc>Output run-tests.log in TAP-compliant format</doc> + </tapoutput> + </options> + <doc>[testfile|dir ...] +Run regression tests with PHP's regression testing script (run-tests.php).</doc> + </run-tests> </commands> \ No newline at end of file http://cvs.php.net/viewcvs.cgi/pear-core/PEAR/Frontend/CLI.php?r1=1.61&r2=1.62&diff_format=u Index: pear-core/PEAR/Frontend/CLI.php diff -u pear-core/PEAR/Frontend/CLI.php:1.61 pear-core/PEAR/Frontend/CLI.php:1.62 --- pear-core/PEAR/Frontend/CLI.php:1.61 Tue Mar 28 04:25:51 2006 +++ pear-core/PEAR/Frontend/CLI.php Tue Mar 28 05:33:42 2006 @@ -1,754 +1,754 @@ -<?php -/** - * PEAR_Frontend_CLI - * - * PHP versions 4 and 5 - * - * LICENSE: This source file is subject to version 3.0 of the PHP license - * that is available through the world-wide-web at the following URI: - * http://www.php.net/license/3_0.txt. If you did not receive a copy of - * the PHP License and are unable to obtain it through the web, please - * send a note to license@php.net so we can mail you a copy immediately. - * - * @category pear - * @package PEAR - * @author Stig Bakken <ssb@php.net> - * @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: CLI.php,v 1.61 2006/03/28 04:25:51 cellog Exp $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 0.1 - */ -/** - * base class - */ -require_once 'PEAR/Frontend.php'; - -/** - * Command-line Frontend for the PEAR Installer - * @category pear - * @package PEAR - * @author Stig Bakken <ssb@php.net> - * @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 Release: @package_version@ - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 0.1 - */ -class PEAR_Frontend_CLI extends PEAR_Frontend -{ - // {{{ properties - - /** - * What type of user interface this frontend is for. - * @var string - * @access public - */ - var $type = 'CLI'; - var $lp = ''; // line prefix - - var $params = array(); - var $term = array( - 'bold' => '', - 'normal' => '', - ); - - // }}} - - // {{{ constructor - - function PEAR_Frontend_CLI() - { - parent::PEAR(); - $term = getenv('TERM'); //(cox) $_ENV is empty for me in 4.1.1 - if (function_exists('posix_isatty') && !posix_isatty(1)) { - // output is being redirected to a file or through a pipe - } elseif ($term) { - // XXX can use ncurses extension here, if available - if (preg_match('/^(xterm|vt220|linux)/', $term)) { - $this->term['bold'] = sprintf("%c%c%c%c", 27, 91, 49, 109); - $this->term['normal']=sprintf("%c%c%c", 27, 91, 109); - } elseif (preg_match('/^vt100/', $term)) { - $this->term['bold'] = sprintf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); - $this->term['normal']=sprintf("%c%c%c%c%c", 27, 91, 109, 0, 0); - } - } elseif (OS_WINDOWS) { - // XXX add ANSI codes here - } - } - - // }}} - - // {{{ displayLine(text) - - function displayLine($text) - { - trigger_error("PEAR_Frontend_CLI::displayLine deprecated", E_USER_ERROR); - } - - function _displayLine($text) - { - print "$this->lp$text\n"; - } - - // }}} - // {{{ display(text) - - function display($text) - { - trigger_error("PEAR_Frontend_CLI::display deprecated", E_USER_ERROR); - } - - function _display($text) - { - print $text; - } - - // }}} - // {{{ displayError(eobj) - - /** - * @param object PEAR_Error object - */ - function displayError($eobj) - { - return $this->_displayLine($eobj->getMessage()); - } - - // }}} - // {{{ displayFatalError(eobj) - - /** - * @param object PEAR_Error object - */ - function displayFatalError($eobj) - { - $this->displayError($eobj); - if (class_exists('PEAR_Config')) { - $config = &PEAR_Config::singleton(); - if ($config->get('verbose') > 5) { - if (function_exists('debug_print_backtrace')) { - debug_print_backtrace(); - } elseif (function_exists('debug_backtrace')) { - $trace = debug_backtrace(); - $raised = false; - foreach ($trace as $i => $frame) { - if (!$raised) { - if (isset($frame['class']) && strtolower($frame['class']) == - 'pear' && strtolower($frame['function']) == 'raiseerror') { - $raised = true; - } else { - continue; - } - } - if (!isset($frame['class'])) { - $frame['class'] = ''; - } - if (!isset($frame['type'])) { - $frame['type'] = ''; - } - if (!isset($frame['function'])) { - $frame['function'] = ''; - } - if (!isset($frame['line'])) { - $frame['line'] = ''; - } - $this->_displayLine("#$i: $frame[class]$frame[type]$frame[function] $frame[line]"); - } - } - } - } - exit(1); - } - - // }}} - // {{{ displayHeading(title) - - function displayHeading($title) - { - trigger_error("PEAR_Frontend_CLI::displayHeading deprecated", E_USER_ERROR); - } - - function _displayHeading($title) - { - print $this->lp.$this->bold($title)."\n"; - print $this->lp.str_repeat("=", strlen($title))."\n"; - } - - // }}} - - /** - * Instruct the runInstallScript method to skip a paramgroup that matches the - * id value passed in. - * - * This method is useful for dynamically configuring which sections of a post-install script - * will be run based on the user's setup, which is very useful for making flexible - * post-install scripts without losing the cross-Frontend ability to retrieve user input - * @param string - */ - function skipParamgroup($id) - { - $this->_skipSections[$id] = true; - } - - function runPostinstallScripts(&$scripts) - { - foreach ($scripts as $i => $script) { - $this->runInstallScript($scripts[$i]->_params, $scripts[$i]->_obj); - } - } - - /** - * @param array $xml contents of postinstallscript tag - * @param object $script post-installation script - * @param string install|upgrade - */ - function runInstallScript($xml, &$script) - { - $this->_skipSections = array(); - if (!is_array($xml) || !isset($xml['paramgroup'])) { - $script->run(array(), '_default'); - } else { - $completedPhases = array(); - if (!isset($xml['paramgroup'][0])) { - $xml['paramgroup'] = array($xml['paramgroup']); - } - foreach ($xml['paramgroup'] as $group) { - if (isset($this->_skipSections[$group['id']])) { - // the post-install script chose to skip this section dynamically - continue; - } - if (isset($group['name'])) { - $paramname = explode('::', $group['name']); - if ($lastgroup['id'] != $paramname[0]) { - continue; - } - $group['name'] = $paramname[1]; - if (isset($answers)) { - if (isset($answers[$group['name']])) { - switch ($group['conditiontype']) { - case '=' : - if ($answers[$group['name']] != $group['value']) { - continue 2; - } - break; - case '!=' : - if ($answers[$group['name']] == $group['value']) { - continue 2; - } - break; - case 'preg_match' : - if (!@preg_match('/' . $group['value'] . '/', - $answers[$group['name']])) { - continue 2; - } - break; - default : - return; - } - } - } else { - return; - } - } - $lastgroup = $group; - if (isset($group['instructions'])) { - $this->_display($group['instructions']); - } - if (!isset($group['param'][0])) { - $group['param'] = array($group['param']); - } - if (isset($group['param'])) { - if (method_exists($script, 'postProcessPrompts')) { - $prompts = $script->postProcessPrompts($group['param'], $group['id']); - if (!is_array($prompts) || count($prompts) != count($group['param'])) { - $this->outputData('postinstall', 'Error: post-install script did not ' . - 'return proper post-processed prompts'); - $prompts = $group['param']; - } else { - foreach ($prompts as $i => $var) { - if (!is_array($var) || !isset($var['prompt']) || - !isset($var['name']) || - ($var['name'] != $group['param'][$i]['name']) || - ($var['type'] != $group['param'][$i]['type'])) { - $this->outputData('postinstall', 'Error: post-install script ' . - 'modified the variables or prompts, severe security risk. ' . - 'Will instead use the defaults from the package.xml'); - $prompts = $group['param']; - } - } - } - $answers = $this->confirmDialog($prompts); - } else { - $answers = $this->confirmDialog($group['param']); - } - } - if ((isset($answers) && $answers) || !isset($group['param'])) { - if (!isset($answers)) { - $answers = array(); - } - array_unshift($completedPhases, $group['id']); - if (!$script->run($answers, $group['id'])) { - $script->run($completedPhases, '_undoOnError'); - return; - } - } else { - $script->run($completedPhases, '_undoOnError'); - return; - } - } - } - } - - /** - * Ask for user input, confirm the answers and continue until the user is satisfied - * @param array an array of arrays, format array('name' => 'paramname', 'prompt' => - * 'text to display', 'type' => 'string'[, default => 'default value']) - * @return array - */ - function confirmDialog($params) - { - $answers = array(); - $prompts = $types = array(); - foreach ($params as $param) { - $prompts[$param['name']] = $param['prompt']; - $types[$param['name']] = $param['type']; - if (isset($param['default'])) { - $answers[$param['name']] = $param['default']; - } else { - $answers[$param['name']] = ''; - } - } - $tried = false; - do { - if ($tried) { - $i = 1; - foreach ($answers as $var => $value) { - if (!strlen($value)) { - echo $this->bold("* Enter an answer for #" . $i . ": ({$prompts[$var]})\n"); - } - $i++; - } - } - $answers = $this->userDialog('', $prompts, $types, $answers); - $tried = true; - } while (is_array($answers) && count(array_filter($answers)) != count($prompts)); - return $answers; - } - // {{{ userDialog(prompt, [type], [default]) - - function userDialog($command, $prompts, $types = array(), $defaults = array(), - $screensize = 20) - { - if (!is_array($prompts)) { - return array(); - } - $testprompts = array_keys($prompts); - $result = $defaults; - if (!defined('STDIN')) { - $fp = fopen('php://stdin', 'r'); - } else { - $fp = STDIN; - } - while (true) { - $descLength = max(array_map('strlen', $prompts)); - $descFormat = "%-{$descLength}s"; - $last = count($prompts); - - $i = 0; - foreach ($prompts as $n => $var) { - printf("%2d. $descFormat : %s\n", ++$i, $prompts[$n], isset($result[$n]) ? - $result[$n] : null); - } - - print "\n1-$last, 'all', 'abort', or Enter to continue: "; - $tmp = trim(fgets($fp, 1024)); - if (empty($tmp)) { - break; - } - if ($tmp == 'abort') { - return false; - } - if (isset($testprompts[(int)$tmp - 1])) { - $var = $testprompts[(int)$tmp - 1]; - $desc = $prompts[$var]; - $current = $result[$var]; - print "$desc [$current] : "; - $result[$var] = trim(fgets($fp, 1024)); - } elseif ($tmp == 'all') { - foreach ($prompts as $var => $desc) { - $current = $result[$var]; - print "$desc [$current] : "; - $tmp = trim(fgets($fp, 1024)); - if (!empty($tmp)) { - $result[$var] = trim($tmp); - } - } - } - } - if (!defined('STDIN')) { - fclose($fp); - } - return $result; - } - - // }}} - // {{{ userConfirm(prompt, [default]) - - function userConfirm($prompt, $default = 'yes') - { - trigger_error("PEAR_Frontend_CLI::userConfirm not yet converted", E_USER_ERROR); - static $positives = array('y', 'yes', 'on', '1'); - static $negatives = array('n', 'no', 'off', '0'); - print "$this->lp$prompt [$default] : "; - $fp = fopen("php://stdin", "r"); - $line = fgets($fp, 2048); - fclose($fp); - $answer = strtolower(trim($line)); - if (empty($answer)) { - $answer = $default; - } - if (in_array($answer, $positives)) { - return true; - } - if (in_array($answer, $negatives)) { - return false; - } - if (in_array($default, $positives)) { - return true; - } - return false; - } - - // }}} - // {{{ startTable([params]) - - function startTable($params = array()) - { - trigger_error("PEAR_Frontend_CLI::startTable deprecated", E_USER_ERROR); - } - - function _startTable($params = array()) - { - $params['table_data'] = array(); - $params['widest'] = array(); // indexed by column - $params['highest'] = array(); // indexed by row - $params['ncols'] = 0; - $this->params = $params; - } - - // }}} - // {{{ tableRow(columns, [rowparams], [colparams]) - - function tableRow($columns, $rowparams = array(), $colparams = array()) - { - trigger_error("PEAR_Frontend_CLI::tableRow deprecated", E_USER_ERROR); - } - - function _tableRow($columns, $rowparams = array(), $colparams = array()) - { - $highest = 1; - for ($i = 0; $i < sizeof($columns); $i++) { - $col = &$columns[$i]; - if (isset($colparams[$i]) && !empty($colparams[$i]['wrap'])) { - $col = wordwrap($col, $colparams[$i]['wrap'], "\n", 0); - } - if (strpos($col, "\n") !== false) { - $multiline = explode("\n", $col); - $w = 0; - foreach ($multiline as $n => $line) { - if (strlen($line) > $w) { - $w = strlen($line); - } - } - $lines = sizeof($multiline); - } else { - $w = strlen($col); - } - - if (isset($this->params['widest'][$i])) { - if ($w > $this->params['widest'][$i]) { - $this->params['widest'][$i] = $w; - } - } else { - $this->params['widest'][$i] = $w; - } - $tmp = count_chars($columns[$i], 1); - // handle unix, mac and windows formats - $lines = (isset($tmp[10]) ? $tmp[10] : (isset($tmp[13]) ? $tmp[13] : 0)) + 1; - if ($lines > $highest) { - $highest = $lines; - } - } - if (sizeof($columns) > $this->params['ncols']) { - $this->params['ncols'] = sizeof($columns); - } - $new_row = array( - 'data' => $columns, - 'height' => $highest, - 'rowparams' => $rowparams, - 'colparams' => $colparams, - ); - $this->params['table_data'][] = $new_row; - } - - // }}} - // {{{ endTable() - - function endTable() - { - trigger_error("PEAR_Frontend_CLI::endTable deprecated", E_USER_ERROR); - } - - function _endTable() - { - extract($this->params); - if (!empty($caption)) { - $this->_displayHeading($caption); - } - if (count($table_data) == 0) { - return; - } - if (!isset($width)) { - $width = $widest; - } else { - for ($i = 0; $i < $ncols; $i++) { - if (!isset($width[$i])) { - $width[$i] = $widest[$i]; - } - } - } - $border = false; - if (empty($border)) { - $cellstart = ''; - $cellend = ' '; - $rowend = ''; - $padrowend = false; - $borderline = ''; - } else { - $cellstart = '| '; - $cellend = ' '; - $rowend = '|'; - $padrowend = true; - $borderline = '+'; - foreach ($width as $w) { - $borderline .= str_repeat('-', $w + strlen($cellstart) + strlen($cellend) - 1); - $borderline .= '+'; - } - } - if ($borderline) { - $this->_displayLine($borderline); - } - for ($i = 0; $i < sizeof($table_data); $i++) { - extract($table_data[$i]); - if (!is_array($rowparams)) { - $rowparams = array(); - } - if (!is_array($colparams)) { - $colparams = array(); - } - $rowlines = array(); - if ($height > 1) { - for ($c = 0; $c < sizeof($data); $c++) { - $rowlines[$c] = preg_split('/(\r?\n|\r)/', $data[$c]); - if (sizeof($rowlines[$c]) < $height) { - $rowlines[$c] = array_pad($rowlines[$c], $height, ''); - } - } - } else { - for ($c = 0; $c < sizeof($data); $c++) { - $rowlines[$c] = array($data[$c]); - } - } - for ($r = 0; $r < $height; $r++) { - $rowtext = ''; - for ($c = 0; $c < sizeof($data); $c++) { - if (isset($colparams[$c])) { - $attribs = array_merge($rowparams, $colparams); - } else { - $attribs = $rowparams; - } - $w = isset($width[$c]) ? $width[$c] : 0; - //$cell = $data[$c]; - $cell = $rowlines[$c][$r]; - $l = strlen($cell); - if ($l > $w) { - $cell = substr($cell, 0, $w); - } - if (isset($attribs['bold'])) { - $cell = $this->bold($cell); - } - if ($l < $w) { - // not using str_pad here because we may - // add bold escape characters to $cell - $cell .= str_repeat(' ', $w - $l); - } - - $rowtext .= $cellstart . $cell . $cellend; - } - if (!$border) { - $rowtext = rtrim($rowtext); - } - $rowtext .= $rowend; - $this->_displayLine($rowtext); - } - } - if ($borderline) { - $this->_displayLine($borderline); - } - } - - // }}} - // {{{ outputData() - - function outputData($data, $command = '_default') - { - switch ($command) { - case 'channel-info': - foreach ($data as $type => $section) { - if ($type == 'main') { - $section['data'] = array_values($section['data']); - } - $this->outputData($section); - } - break; - case 'install': - case 'upgrade': - case 'upgrade-all': - if (isset($data['release_warnings'])) { - $this->_displayLine(''); - $this->_startTable(array( - 'border' => false, - 'caption' => 'Release Warnings' - )); - $this->_tableRow(array($data['release_warnings']), null, array(1 => array('wrap' => 55))); - $this->_endTable(); - $this->_displayLine(''); - } - $this->_displayLine($data['data']); - break; - case 'search': - $this->_startTable($data); - if (isset($data['headline']) && is_array($data['headline'])) { - $this->_tableRow($data['headline'], array('bold' => true), array(1 => array('wrap' => 55))); - } - - foreach($data['data'] as $category) { - foreach($category as $pkg) { - $this->_tableRow($pkg, null, array(1 => array('wrap' => 55))); - } - }; - $this->_endTable(); - break; - case 'list-all': - $this->_startTable($data); - if (isset($data['headline']) && is_array($data['headline'])) { - $this->_tableRow($data['headline'], array('bold' => true), array(1 => array('wrap' => 55))); - } - - foreach($data['data'] as $category) { - foreach($category as $pkg) { - unset($pkg[4]); - unset($pkg[5]); - $this->_tableRow($pkg, null, array(1 => array('wrap' => 55))); - } - }; - $this->_endTable(); - break; - case 'config-show': - $data['border'] = false; - $opts = array(0 => array('wrap' => 30), - 1 => array('wrap' => 20), - 2 => array('wrap' => 35)); - $this->_startTable($data); - if (isset($data['headline']) && is_array($data['headline'])) { - $this->_tableRow($data['headline'], - array('bold' => true), - $opts); - } - foreach($data['data'] as $group) { - foreach($group as $value) { - if ($value[2] == '') { - $value[2] = "<not set>"; - } - $this->_tableRow($value, null, $opts); - } - } - $this->_endTable(); - break; - case 'remote-info': - $data = array( - 'caption' => 'Package details:', - 'border' => false, - 'data' => array( - array("Latest", $data['stable']), - array("Installed", $data['installed']), - array("Package", $data['name']), - array("License", $data['license']), - array("Category", $data['category']), - array("Summary", $data['summary']), - array("Description", $data['description']), - ), - ); - default: { - if (is_array($data)) { - $this->_startTable($data); - $count = count($data['data'][0]); - if ($count == 2) { - $opts = array(0 => array('wrap' => 25), - 1 => array('wrap' => 48) - ); - } elseif ($count == 3) { - $opts = array(0 => array('wrap' => 30), - 1 => array('wrap' => 20), - 2 => array('wrap' => 35) - ); - } else { - $opts = null; - } - if (isset($data['headline']) && is_array($data['headline'])) { - $this->_tableRow($data['headline'], - array('bold' => true), - $opts); - } - foreach($data['data'] as $row) { - $this->_tableRow($row, null, $opts); - } - $this->_endTable(); - } else { - $this->_displayLine($data); - } - } - } - } - - // }}} - // {{{ log(text) - - - function log($text, $append_crlf = true) - { - if ($append_crlf) { - return $this->_displayLine($text); - } - return $this->_display($text); - } - - - // }}} - // {{{ bold($text) - - function bold($text) - { - if (empty($this->term['bold'])) { - return strtoupper($text); - } - return $this->term['bold'] . $text . $this->term['normal']; - } - - // }}} -} - -?> +<?php +/** + * PEAR_Frontend_CLI + * + * PHP versions 4 and 5 + * + * LICENSE: This source file is subject to version 3.0 of the PHP license + * that is available through the world-wide-web at the following URI: + * http://www.php.net/license/3_0.txt. If you did not receive a copy of + * the PHP License and are unable to obtain it through the web, please + * send a note to license@php.net so we can mail you a copy immediately. + * + * @category pear + * @package PEAR + * @author Stig Bakken <ssb@php.net> + * @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: CLI.php,v 1.62 2006/03/28 05:33:42 cellog Exp $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 0.1 + */ +/** + * base class + */ +require_once 'PEAR/Frontend.php'; + +/** + * Command-line Frontend for the PEAR Installer + * @category pear + * @package PEAR + * @author Stig Bakken <ssb@php.net> + * @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 Release: @package_version@ + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 0.1 + */ +class PEAR_Frontend_CLI extends PEAR_Frontend +{ + // {{{ properties + + /** + * What type of user interface this frontend is for. + * @var string + * @access public + */ + var $type = 'CLI'; + var $lp = ''; // line prefix + + var $params = array(); + var $term = array( + 'bold' => '', + 'normal' => '', + ); + + // }}} + + // {{{ constructor + + function PEAR_Frontend_CLI() + { + parent::PEAR(); + $term = getenv('TERM'); //(cox) $_ENV is empty for me in 4.1.1 + if (function_exists('posix_isatty') && !posix_isatty(1)) { + // output is being redirected to a file or through a pipe + } elseif ($term) { + // XXX can use ncurses extension here, if available + if (preg_match('/^(xterm|vt220|linux)/', $term)) { + $this->term['bold'] = sprintf("%c%c%c%c", 27, 91, 49, 109); + $this->term['normal']=sprintf("%c%c%c", 27, 91, 109); + } elseif (preg_match('/^vt100/', $term)) { + $this->term['bold'] = sprintf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); + $this->term['normal']=sprintf("%c%c%c%c%c", 27, 91, 109, 0, 0); + } + } elseif (OS_WINDOWS) { + // XXX add ANSI codes here + } + } + + // }}} + + // {{{ displayLine(text) + + function displayLine($text) + { + trigger_error("PEAR_Frontend_CLI::displayLine deprecated", E_USER_ERROR); + } + + function _displayLine($text) + { + print "$this->lp$text\n"; + } + + // }}} + // {{{ display(text) + + function display($text) + { + trigger_error("PEAR_Frontend_CLI::display deprecated", E_USER_ERROR); + } + + function _display($text) + { + print $text; + } + + // }}} + // {{{ displayError(eobj) + + /** + * @param object PEAR_Error object + */ + function displayError($eobj) + { + return $this->_displayLine($eobj->getMessage()); + } + + // }}} + // {{{ displayFatalError(eobj) + + /** + * @param object PEAR_Error object + */ + function displayFatalError($eobj) + { + $this->displayError($eobj); + if (class_exists('PEAR_Config')) { + $config = &PEAR_Config::singleton(); + if ($config->get('verbose') > 5) { + if (function_exists('debug_print_backtrace')) { + debug_print_backtrace(); + } elseif (function_exists('debug_backtrace')) { + $trace = debug_backtrace(); + $raised = false; + foreach ($trace as $i => $frame) { + if (!$raised) { + if (isset($frame['class']) && strtolower($frame['class']) == + 'pear' && strtolower($frame['function']) == 'raiseerror') { + $raised = true; + } else { + continue; + } + } + if (!isset($frame['class'])) { + $frame['class'] = ''; + } + if (!isset($frame['type'])) { + $frame['type'] = ''; + } + if (!isset($frame['function'])) { + $frame['function'] = ''; + } + if (!isset($frame['line'])) { + $frame['line'] = ''; + } + $this->_displayLine("#$i: $frame[class]$frame[type]$frame[function] $frame[line]"); + } + } + } + } + exit(1); + } + + // }}} + // {{{ displayHeading(title) + + function displayHeading($title) + { + trigger_error("PEAR_Frontend_CLI::displayHeading deprecated", E_USER_ERROR); + } + + function _displayHeading($title) + { + print $this->lp.$this->bold($title)."\n"; + print $this->lp.str_repeat("=", strlen($title))."\n"; + } + + // }}} + + /** + * Instruct the runInstallScript method to skip a paramgroup that matches the + * id value passed in. + * + * This method is useful for dynamically configuring which sections of a post-install script + * will be run based on the user's setup, which is very useful for making flexible + * post-install scripts without losing the cross-Frontend ability to retrieve user input + * @param string + */ + function skipParamgroup($id) + { + $this->_skipSections[$id] = true; + } + + function runPostinstallScripts(&$scripts) + { + foreach ($scripts as $i => $script) { + $this->runInstallScript($scripts[$i]->_params, $scripts[$i]->_obj); + } + } + + /** + * @param array $xml contents of postinstallscript tag + * @param object $script post-installation script + * @param string install|upgrade + */ + function runInstallScript($xml, &$script) + { + $this->_skipSections = array(); + if (!is_array($xml) || !isset($xml['paramgroup'])) { + $script->run(array(), '_default'); + } else { + $completedPhases = array(); + if (!isset($xml['paramgroup'][0])) { + $xml['paramgroup'] = array($xml['paramgroup']); + } + foreach ($xml['paramgroup'] as $group) { + if (isset($this->_skipSections[$group['id']])) { + // the post-install script chose to skip this section dynamically + continue; + } + if (isset($group['name'])) { + $paramname = explode('::', $group['name']); + if ($lastgroup['id'] != $paramname[0]) { + continue; + } + $group['name'] = $paramname[1]; + if (isset($answers)) { + if (isset($answers[$group['name']])) { + switch ($group['conditiontype']) { + case '=' : + if ($answers[$group['name']] != $group['value']) { + continue 2; + } + break; + case '!=' : + if ($answers[$group['name']] == $group['value']) { + continue 2; + } + break; + case 'preg_match' : + if (!@preg_match('/' . $group['value'] . '/', + $answers[$group['name']])) { + continue 2; + } + break; + default : + return; + } + } + } else { + return; + } + } + $lastgroup = $group; + if (isset($group['instructions'])) { + $this->_display($group['instructions']); + } + if (!isset($group['param'][0])) { + $group['param'] = array($group['param']); + } + if (isset($group['param'])) { + if (method_exists($script, 'postProcessPrompts')) { + $prompts = $script->postProcessPrompts($group['param'], $group['id']); + if (!is_array($prompts) || count($prompts) != count($group['param'])) { + $this->outputData('postinstall', 'Error: post-install script did not ' . + 'return proper post-processed prompts'); + $prompts = $group['param']; + } else { + foreach ($prompts as $i => $var) { + if (!is_array($var) || !isset($var['prompt']) || + !isset($var['name']) || + ($var['name'] != $group['param'][$i]['name']) || + ($var['type'] != $group['param'][$i]['type'])) { + $this->outputData('postinstall', 'Error: post-install script ' . + 'modified the variables or prompts, severe security risk. ' . + 'Will instead use the defaults from the package.xml'); + $prompts = $group['param']; + } + } + } + $answers = $this->confirmDialog($prompts); + } else { + $answers = $this->confirmDialog($group['param']); + } + } + if ((isset($answers) && $answers) || !isset($group['param'])) { + if (!isset($answers)) { + $answers = array(); + } + array_unshift($completedPhases, $group['id']); + if (!$script->run($answers, $group['id'])) { + $script->run($completedPhases, '_undoOnError'); + return; + } + } else { + $script->run($completedPhases, '_undoOnError'); + return; + } + } + } + } + + /** + * Ask for user input, confirm the answers and continue until the user is satisfied + * @param array an array of arrays, format array('name' => 'paramname', 'prompt' => + * 'text to display', 'type' => 'string'[, default => 'default value']) + * @return array + */ + function confirmDialog($params) + { + $answers = array(); + $prompts = $types = array(); + foreach ($params as $param) { + $prompts[$param['name']] = $param['prompt']; + $types[$param['name']] = $param['type']; + if (isset($param['default'])) { + $answers[$param['name']] = $param['default']; + } else { + $answers[$param['name']] = ''; + } + } + $tried = false; + do { + if ($tried) { + $i = 1; + foreach ($answers as $var => $value) { + if (!strlen($value)) { + echo $this->bold("* Enter an answer for #" . $i . ": ({$prompts[$var]})\n"); + } + $i++; + } + } + $answers = $this->userDialog('', $prompts, $types, $answers); + $tried = true; + } while (is_array($answers) && count(array_filter($answers)) != count($prompts)); + return $answers; + } + // {{{ userDialog(prompt, [type], [default]) + + function userDialog($command, $prompts, $types = array(), $defaults = array(), + $screensize = 20) + { + if (!is_array($prompts)) { + return array(); + } + $testprompts = array_keys($prompts); + $result = $defaults; + if (!defined('STDIN')) { + $fp = fopen('php://stdin', 'r'); + } else { + $fp = STDIN; + } + while (true) { + $descLength = max(array_map('strlen', $prompts)); + $descFormat = "%-{$descLength}s"; + $last = count($prompts); + + $i = 0; + foreach ($prompts as $n => $var) { + printf("%2d. $descFormat : %s\n", ++$i, $prompts[$n], isset($result[$n]) ? + $result[$n] : null); + } + + print "\n1-$last, 'all', 'abort', or Enter to continue: "; + $tmp = trim(fgets($fp, 1024)); + if (empty($tmp)) { + break; + } + if ($tmp == 'abort') { + return false; + } + if (isset($testprompts[(int)$tmp - 1])) { + $var = $testprompts[(int)$tmp - 1]; + $desc = $prompts[$var]; + $current = $result[$var]; + print "$desc [$current] : "; + $result[$var] = trim(fgets($fp, 1024)); + } elseif ($tmp == 'all') { + foreach ($prompts as $var => $desc) { + $current = $result[$var]; + print "$desc [$current] : "; + $tmp = trim(fgets($fp, 1024)); + if (!empty($tmp)) { + $result[$var] = trim($tmp); + } + } + } + } + if (!defined('STDIN')) { + fclose($fp); + } + return $result; + } + + // }}} + // {{{ userConfirm(prompt, [default]) + + function userConfirm($prompt, $default = 'yes') + { + trigger_error("PEAR_Frontend_CLI::userConfirm not yet converted", E_USER_ERROR); + static $positives = array('y', 'yes', 'on', '1'); + static $negatives = array('n', 'no', 'off', '0'); + print "$this->lp$prompt [$default] : "; + $fp = fopen("php://stdin", "r"); + $line = fgets($fp, 2048); + fclose($fp); + $answer = strtolower(trim($line)); + if (empty($answer)) { + $answer = $default; + } + if (in_array($answer, $positives)) { + return true; + } + if (in_array($answer, $negatives)) { + return false; + } + if (in_array($default, $positives)) { + return true; + } + return false; + } + + // }}} + // {{{ startTable([params]) + + function startTable($params = array()) + { + trigger_error("PEAR_Frontend_CLI::startTable deprecated", E_USER_ERROR); + } + + function _startTable($params = array()) + { + $params['table_data'] = array(); + $params['widest'] = array(); // indexed by column + $params['highest'] = array(); // indexed by row + $params['ncols'] = 0; + $this->params = $params; + } + + // }}} + // {{{ tableRow(columns, [rowparams], [colparams]) + + function tableRow($columns, $rowparams = array(), $colparams = array()) + { + trigger_error("PEAR_Frontend_CLI::tableRow deprecated", E_USER_ERROR); + } + + function _tableRow($columns, $rowparams = array(), $colparams = array()) + { + $highest = 1; + for ($i = 0; $i < sizeof($columns); $i++) { + $col = &$columns[$i]; + if (isset($colparams[$i]) && !empty($colparams[$i]['wrap'])) { + $col = wordwrap($col, $colparams[$i]['wrap'], "\n", 0); + } + if (strpos($col, "\n") !== false) { + $multiline = explode("\n", $col); + $w = 0; + foreach ($multiline as $n => $line) { + if (strlen($line) > $w) { + $w = strlen($line); + } + } + $lines = sizeof($multiline); + } else { + $w = strlen($col); + } + + if (isset($this->params['widest'][$i])) { + if ($w > $this->params['widest'][$i]) { + $this->params['widest'][$i] = $w; + } + } else { + $this->params['widest'][$i] = $w; + } + $tmp = count_chars($columns[$i], 1); + // handle unix, mac and windows formats + $lines = (isset($tmp[10]) ? $tmp[10] : (isset($tmp[13]) ? $tmp[13] : 0)) + 1; + if ($lines > $highest) { + $highest = $lines; + } + } + if (sizeof($columns) > $this->params['ncols']) { + $this->params['ncols'] = sizeof($columns); + } + $new_row = array( + 'data' => $columns, + 'height' => $highest, + 'rowparams' => $rowparams, + 'colparams' => $colparams, + ); + $this->params['table_data'][] = $new_row; + } + + // }}} + // {{{ endTable() + + function endTable() + { + trigger_error("PEAR_Frontend_CLI::endTable deprecated", E_USER_ERROR); + } + + function _endTable() + { + extract($this->params); + if (!empty($caption)) { + $this->_displayHeading($caption); + } + if (count($table_data) == 0) { + return; + } + if (!isset($width)) { + $width = $widest; + } else { + for ($i = 0; $i < $ncols; $i++) { + if (!isset($width[$i])) { + $width[$i] = $widest[$i]; + } + } + } + $border = false; + if (empty($border)) { + $cellstart = ''; + $cellend = ' '; + $rowend = ''; + $padrowend = false; + $borderline = ''; + } else { + $cellstart = '| '; + $cellend = ' '; + $rowend = '|'; + $padrowend = true; + $borderline = '+'; + foreach ($width as $w) { + $borderline .= str_repeat('-', $w + strlen($cellstart) + strlen($cellend) - 1); + $borderline .= '+'; + } + } + if ($borderline) { + $this->_displayLine($borderline); + } + for ($i = 0; $i < sizeof($table_data); $i++) { + extract($table_data[$i]); + if (!is_array($rowparams)) { + $rowparams = array(); + } + if (!is_array($colparams)) { + $colparams = array(); + } + $rowlines = array(); + if ($height > 1) { + for ($c = 0; $c < sizeof($data); $c++) { + $rowlines[$c] = preg_split('/(\r?\n|\r)/', $data[$c]); + if (sizeof($rowlines[$c]) < $height) { + $rowlines[$c] = array_pad($rowlines[$c], $height, ''); + } + } + } else { + for ($c = 0; $c < sizeof($data); $c++) { + $rowlines[$c] = array($data[$c]); + } + } + for ($r = 0; $r < $height; $r++) { + $rowtext = ''; + for ($c = 0; $c < sizeof($data); $c++) { + if (isset($colparams[$c])) { + $attribs = array_merge($rowparams, $colparams); + } else { + $attribs = $rowparams; + } + $w = isset($width[$c]) ? $width[$c] : 0; + //$cell = $data[$c]; + $cell = $rowlines[$c][$r]; + $l = strlen($cell); + if ($l > $w) { + $cell = substr($cell, 0, $w); + } + if (isset($attribs['bold'])) { + $cell = $this->bold($cell); + } + if ($l < $w) { + // not using str_pad here because we may + // add bold escape characters to $cell + $cell .= str_repeat(' ', $w - $l); + } + + $rowtext .= $cellstart . $cell . $cellend; + } + if (!$border) { + $rowtext = rtrim($rowtext); + } + $rowtext .= $rowend; + $this->_displayLine($rowtext); + } + } + if ($borderline) { + $this->_displayLine($borderline); + } + } + + // }}} + // {{{ outputData() + + function outputData($data, $command = '_default') + { + switch ($command) { + case 'channel-info': + foreach ($data as $type => $section) { + if ($type == 'main') { + $section['data'] = array_values($section['data']); + } + $this->outputData($section); + } + break; + case 'install': + case 'upgrade': + case 'upgrade-all': + if (isset($data['release_warnings'])) { + $this->_displayLine(''); + $this->_startTable(array( + 'border' => false, + 'caption' => 'Release Warnings' + )); + $this->_tableRow(array($data['release_warnings']), null, array(1 => array('wrap' => 55))); + $this->_endTable(); + $this->_displayLine(''); + } + $this->_displayLine($data['data']); + break; + case 'search': + $this->_startTable($data); + if (isset($data['headline']) && is_array($data['headline'])) { + $this->_tableRow($data['headline'], array('bold' => true), array(1 => array('wrap' => 55))); + } + + foreach($data['data'] as $category) { + foreach($category as $pkg) { + $this->_tableRow($pkg, null, array(1 => array('wrap' => 55))); + } + }; + $this->_endTable(); + break; + case 'list-all': + $this->_startTable($data); + if (isset($data['headline']) && is_array($data['headline'])) { + $this->_tableRow($data['headline'], array('bold' => true), array(1 => array('wrap' => 55))); + } + + foreach($data['data'] as $category) { + foreach($category as $pkg) { + unset($pkg[4]); + unset($pkg[5]); + $this->_tableRow($pkg, null, array(1 => array('wrap' => 55))); + } + }; + $this->_endTable(); + break; + case 'config-show': + $data['border'] = false; + $opts = array(0 => array('wrap' => 30), + 1 => array('wrap' => 20), + 2 => array('wrap' => 35)); + $this->_startTable($data); + if (isset($data['headline']) && is_array($data['headline'])) { + $this->_tableRow($data['headline'], + array('bold' => true), + $opts); + } + foreach($data['data'] as $group) { + foreach($group as $value) { + if ($value[2] == '') { + $value[2] = "<not set>"; + } + $this->_tableRow($value, null, $opts); + } + } + $this->_endTable(); + break; + case 'remote-info': + $data = array( + 'caption' => 'Package details:', + 'border' => false, + 'data' => array( + array("Latest", $data['stable']), + array("Installed", $data['installed']), + array("Package", $data['name']), + array("License", $data['license']), + array("Category", $data['category']), + array("Summary", $data['summary']), + array("Description", $data['description']), + ), + ); + default: { + if (is_array($data)) { + $this->_startTable($data); + $count = count($data['data'][0]); + if ($count == 2) { + $opts = array(0 => array('wrap' => 25), + 1 => array('wrap' => 48) + ); + } elseif ($count == 3) { + $opts = array(0 => array('wrap' => 30), + 1 => array('wrap' => 20), + 2 => array('wrap' => 35) + ); + } else { + $opts = null; + } + if (isset($data['headline']) && is_array($data['headline'])) { + $this->_tableRow($data['headline'], + array('bold' => true), + $opts); + } + foreach($data['data'] as $row) { + $this->_tableRow($row, null, $opts); + } + $this->_endTable(); + } else { + $this->_displayLine($data); + } + } + } + } + + // }}} + // {{{ log(text) + + + function log($text, $append_crlf = true) + { + if ($append_crlf) { + return $this->_displayLine($text); + } + return $this->_display($text); + } + + + // }}} + // {{{ bold($text) + + function bold($text) + { + if (empty($this->term['bold'])) { + return strtoupper($text); + } + return $this->term['bold'] . $text . $this->term['normal']; + } + + // }}} +} + +?>