cvs: pear-core / package-PEAR.xml package2.xml /PEAR Installer.php /PEAR/Command Install.php
| From: | Greg Beaver | Date: | Thu, 13 Apr 2006 00:50:40 +0000 |
| Subject: | cvs: pear-core / package-PEAR.xml package2.xml /PEAR Installer.php /PEAR/Command Install.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-4718@lists.php.net to get a copy of this message | ||
cellog Thu Apr 13 00:50:40 2006 UTC
Modified files:
/pear-core package-PEAR.xml package2.xml
/pear-core/PEAR Installer.php
/pear-core/PEAR/Command Install.php
Log:
* fix Bug #7203: pecl install <name> does not use the correct ext_dir
* fix Bug #7385: if post-install script or extension are present
and --packagingroot, fatal erro
http://cvs.php.net/viewcvs.cgi/pear-core/package-PEAR.xml?r1=1.365&r2=1.366&diff_format=u
Index: pear-core/package-PEAR.xml
diff -u pear-core/package-PEAR.xml:1.365 pear-core/package-PEAR.xml:1.366
--- pear-core/package-PEAR.xml:1.365 Wed Apr 12 21:44:50 2006
+++ pear-core/package-PEAR.xml Thu Apr 13 00:50:40 2006
@@ -87,11 +87,14 @@
* 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 #7203: pecl install <name> does not use the correct ext_dir
* 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
* fix Bug #7351: setting custom config variable in a channel fails
* fix Bug #7368: undefined function: getProvidesextension()
+ * fix Bug #7385: if post-install script or extension are present
+ and --packagingroot, fatal erro
* 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)
http://cvs.php.net/viewcvs.cgi/pear-core/package2.xml?r1=1.259&r2=1.260&diff_format=u
Index: pear-core/package2.xml
diff -u pear-core/package2.xml:1.259 pear-core/package2.xml:1.260
--- pear-core/package2.xml:1.259 Wed Apr 12 21:44:50 2006
+++ pear-core/package2.xml Thu Apr 13 00:50:40 2006
@@ -92,11 +92,14 @@
* 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 #7203: pecl install <name> does not use the correct ext_dir
* 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
* fix Bug #7351: setting custom config variable in a channel fails
* fix Bug #7368: undefined function: getProvidesextension()
+ * fix Bug #7385: if post-install script or extension are present
+ and --packagingroot, fatal erro
* 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)
http://cvs.php.net/viewcvs.cgi/pear-core/PEAR/Installer.php?r1=1.232&r2=1.233&diff_format=u
Index: pear-core/PEAR/Installer.php
diff -u pear-core/PEAR/Installer.php:1.232 pear-core/PEAR/Installer.php:1.233
--- pear-core/PEAR/Installer.php:1.232 Thu Mar 30 00:02:46 2006
+++ pear-core/PEAR/Installer.php Thu Apr 13 00:50:40 2006
@@ -18,7 +18,7 @@
* @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: Installer.php,v 1.232 2006/03/30 00:02:46 cellog Exp $
+ * @version CVS: $Id: Installer.php,v 1.233 2006/04/13 00:50:40 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -1036,6 +1036,9 @@
$pkgname = $pkg->getName();
$channel = $pkg->getChannel();
if (isset($this->_options['packagingroot'])) {
+ $regdir = $this->_prependPath(
+ $this->config->get('php_dir', null, 'pear.php.net'),
+ $this->_options['packagingroot']);
$packrootphp_dir = $this->_prependPath(
$this->config->get('php_dir', null, $channel),
$this->_options['packagingroot']);
@@ -1051,7 +1054,7 @@
$this->config->setInstallRoot(false);
$this->_registry = &$this->config->getRegistry();
if (isset($this->_options['packagingroot'])) {
- $installregistry = &new PEAR_Registry($packrootphp_dir);
+ $installregistry = &new PEAR_Registry($regdir);
$php_dir = $packrootphp_dir;
} else {
$installregistry = &$this->_registry;
@@ -1368,12 +1371,16 @@
$role = 'src';
}
$dest = $ext['dest'];
- $this->log(1, "Installing '$ext[file]'");
$packagingroot = '';
if (isset($this->_options['packagingroot'])) {
$packagingroot = $this->_options['packagingroot'];
}
$copyto = $this->_prependPath($dest, $packagingroot);
+ if ($copyto != $dest) {
+ $this->log(1, "Installing '$dest' as '$copyto'");
+ } else {
+ $this->log(1, "Installing '$dest'");
+ }
$copydir = dirname($copyto);
// pretty much nothing happens if we are only registering the install
if (empty($this->_options['register-only'])) {
http://cvs.php.net/viewcvs.cgi/pear-core/PEAR/Command/Install.php?r1=1.117&r2=1.118&diff_format=u
Index: pear-core/PEAR/Command/Install.php
diff -u pear-core/PEAR/Command/Install.php:1.117 pear-core/PEAR/Command/Install.php:1.118
--- pear-core/PEAR/Command/Install.php:1.117 Mon Apr 3 01:07:18 2006
+++ pear-core/PEAR/Command/Install.php Thu Apr 13 00:50:40 2006
@@ -16,7 +16,7 @@
* @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: Install.php,v 1.117 2006/04/03 01:07:18 cellog Exp $
+ * @version CVS: $Id: Install.php,v 1.118 2006/04/13 00:50:40 cellog Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -452,6 +452,14 @@
return true;
}
$extrainfo = array();
+ if (isset($options['packagingroot'])) {
+ $packrootphp_dir = $this->installer->_prependPath(
+ $this->config->get('php_dir', null, 'pear.php.net'),
+ $options['packagingroot']);
+ $instreg = new PEAR_Registry($packrootphp_dir);
+ } else {
+ $instreg = $reg;
+ }
foreach ($downloaded as $param) {
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
$info = $this->installer->install($param, $options);
@@ -475,9 +483,9 @@
$param->getPackageType() == 'extbin') {
$pkg = &$param->getPackageFile();
if ($instbin = $pkg->getInstalledBinary()) {
- $instpkg = &$reg->getPackage($instbin, $pkg->getChannel());
+ $instpkg = &$instreg->getPackage($instbin, $pkg->getChannel());
} else {
- $instpkg = &$reg->getPackage($pkg->getPackage(),
$pkg->getChannel());
+ $instpkg = &$instreg->getPackage($pkg->getPackage(),
$pkg->getChannel());
}
foreach ($instpkg->getFilelist() as $name => $atts) {
$pinfo = pathinfo($atts['installed_as']);
@@ -551,7 +559,12 @@
if (isset($options['installroot'])) {
$reg = &$this->config->getRegistry();
}
- $pkg = &$reg->getPackage($param->getPackage(), $param->getChannel());
+ if (isset($options['packagingroot'])) {
+ $instreg = new PEAR_Registry($packrootphp_dir);
+ } else {
+ $instreg = $reg;
+ }
+ $pkg = &$instreg->getPackage($param->getPackage(),
$param->getChannel());
// $pkg may be NULL if install is a 'fake' install via --packagingroot
if (is_object($pkg)) {
$pkg->setConfig($this->config);