cvs: php4(NEW_UI_API) /pear package-PEAR.xml /pear/PEAR Common.php Installer.php /pear/scripts pear.in

From: Date: Sun, 02 Jun 2002 12:59:19 +0000
Subject: cvs: php4(NEW_UI_API) /pear package-PEAR.xml /pear/PEAR Common.php Installer.php /pear/scripts pear.in
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-4364@lists.php.net to get a copy of this message
ssb Sun Jun 2 08:59:19 2002 EDT Modified files: (Branch: NEW_UI_API) /php4/pear package-PEAR.xml /php4/pear/PEAR Common.php Installer.php /php4/pear/scripts pear.in Log: * implemented "package-info" replacement in package.xml # look for @pear_version@ in scripts/pear.in for an example Index: php4/pear/package-PEAR.xml diff -u php4/pear/package-PEAR.xml:1.12.2.1 php4/pear/package-PEAR.xml:1.12.2.2 --- php4/pear/package-PEAR.xml:1.12.2.1 Sun Jun 2 03:52:16 2002 +++ php4/pear/package-PEAR.xml Sun Jun 2 08:59:18 2002 @@ -80,6 +80,7 @@ <dir name="scripts"> <file baseinstalldir="/" role="script" install-as="pear" name="pear.in"> <replace from="@prefix@/bin" to="PHP_BINDIR" type="php-const"/> + <replace from="@pear_version@" to="version" type="package-info"/> </file> <file baseinstalldir="/" role="script" platform="windows" name="pear.bat"></file> </dir> Index: php4/pear/PEAR/Common.php diff -u php4/pear/PEAR/Common.php:1.67.2.3 php4/pear/PEAR/Common.php:1.67.2.4 --- php4/pear/PEAR/Common.php:1.67.2.3 Wed May 29 08:59:10 2002 +++ php4/pear/PEAR/Common.php Sun Jun 2 08:59:19 2002 @@ -17,7 +17,7 @@ // | Tomas V.V.Cox <cox@idecnet.com> | // +----------------------------------------------------------------------+ // -// $Id: Common.php,v 1.67.2.3 2002/05/29 12:59:10 dickmann Exp $ +// $Id: Common.php,v 1.67.2.4 2002/06/02 12:59:19 ssb Exp $ require_once 'PEAR.php'; require_once 'Archive/Tar.php'; @@ -67,7 +67,7 @@ * Valid replacement types * @var array */ -$GLOBALS['_PEAR_Common_replacement_types'] = array('php-const', 'pear-config'); +$GLOBALS['_PEAR_Common_replacement_types'] = array('php-const', 'pear-config', 'package-info'); /** * Valid "provide" types Index: php4/pear/PEAR/Installer.php diff -u php4/pear/PEAR/Installer.php:1.64.2.5 php4/pear/PEAR/Installer.php:1.64.2.6 --- php4/pear/PEAR/Installer.php:1.64.2.5 Sun Jun 2 07:47:04 2002 +++ php4/pear/PEAR/Installer.php Sun Jun 2 08:59:19 2002 @@ -17,7 +17,7 @@ // | Tomas V.V.Cox <cox@idecnet.com> | // +----------------------------------------------------------------------+ // -// $Id: Installer.php,v 1.64.2.5 2002/06/02 11:47:04 ssb Exp $ +// $Id: Installer.php,v 1.64.2.6 2002/06/02 12:59:19 ssb Exp $ require_once 'PEAR/Common.php'; require_once 'PEAR/Registry.php'; @@ -223,10 +223,12 @@ } } elseif ($a['type'] == 'pear-config') { $to = $this->config->get($a['to']); + } elseif ($a['type'] == 'package-info') { + $to = $this->pkginfo[$a['to']]; } if ($to) { - $subst_from = $a['from']; - $subst_to = $to; + $subst_from[] = $a['from']; + $subst_to[] = $to; } } $this->log(2, "doing ".sizeof($subst_from)." substitution(s) for $dest_file"); Index: php4/pear/scripts/pear.in diff -u php4/pear/scripts/pear.in:1.56.2.1 php4/pear/scripts/pear.in:1.56.2.2 --- php4/pear/scripts/pear.in:1.56.2.1 Sun Jun 2 03:49:56 2002 +++ php4/pear/scripts/pear.in Sun Jun 2 08:59:19 2002 @@ -19,7 +19,7 @@ // | | // +----------------------------------------------------------------------+ // -// $Id: pear.in,v 1.56.2.1 2002/06/02 07:49:56 ssb Exp $ +// $Id: pear.in,v 1.56.2.2 2002/06/02 12:59:19 ssb Exp $ /** * @nodep Gtk @@ -33,6 +33,8 @@ error_reporting(E_ALL & ~E_NOTICE); set_error_handler('error_handler'); +$pear_package_version = "@pear_version@"; + require_once 'PEAR.php'; require_once 'PEAR/Config.php'; require_once 'PEAR/Command.php'; @@ -227,7 +229,6 @@ " -u foo unset `foo' in the user configuration\n". " -h, -? display help/usage (this message)\n". " -V version information\n"; - } elseif ($command == "shortcuts") { $sc = PEAR_Command::getShortcuts(); $ret = "Shortcuts:\n"; @@ -237,8 +238,7 @@ return $ret; } elseif ($command == "version") { - $reg = &new PEAR_Registry($config->get('php_dir')); - return "PEAR " . $reg->packageInfo('PEAR', 'version'); + return "PEAR $GLOBALS[pear_package_version]"; } elseif ($help = PEAR_Command::getHelp($command)) { if (is_string($help)) {

« previous php.pear.cvs (#4364) next »