PHP PEAR CVS 35 CVS PHP SRC PEAR INSTALL PEAR PHP
Date: Thu, 03 Jul 2003 06:45:49 -0000

Subject: cvs: php-src /pear install-pear.php
From: cox@no-spam (Tomas V.V.Cox)

cox Thu Jul 3 02:45:49 2003 EDT
Modified files: /php-src/pear install-pear.php Log:
Write the PEAR system config file while installing Index: php-src/pear/install-pear.php diff -u php-src/pear/install-pear.php:1.10 php-src/pear/install-pear.php:1.11
--- php-src/pear/install-pear.php:1.10 Thu Jul 3 01:09:36 2003
+++ php-src/pear/install-pear.php Thu Jul 3 02:45:49 2003
@@no-spam -1,9 +1,6 @@no-spam <?php -// XXX TODO write the config file at the end as for example -// in 'system' layer -
-/* $Id: install-pear.php,v 1.10 2003/07/03 05:09:36 cox Exp $ */
+/* $Id: install-pear.php,v 1.11 2003/07/03 06:45:49 cox Exp $ */
$pear_dir = dirname(__FILE__);
ini_set('include_path', $pear_dir);
@@no-spam -112,6 +109,18 @@no-spam $new_ver = $reg->packageInfo($package, 'version');
$ui->outputData(sprintf("[PEAR] %-15s- installed: %s", $package, $new_ver));

}
+ if ($package == 'PEAR') {
+ if (is_file($ufile = $config->getConfFile('user'))) {
+ $ui->outputData('Warning! a PEAR user config file already exists from ' .

+ 'a previous PEAR installation at ' .
+ "'$ufile'. You may probably want to remove it.");
+ }
+ $ui->outputData('Writing PEAR system config file at: ' . $config->files['system']);

+ $ui->outputData('You may want to add: ' . $config->get('php_dir') . ' to your php.ini include_path');

+ foreach ($config->getKeys() as $key) {
+ $data[$key] = $config->get($key);
+ }
+ $config->store('system', $data);
+ }
}
-
?>