Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.3.0

Bug #10116 fatal error when packaging packages from other channel
Submitted: 2007-02-18 04:31 UTC
From: cellog Assigned: cellog
Status: Closed Package: PEAR_Command_Packaging (version 0.1.2)
PHP Version: Irrelevant OS: n/a
Roadmaps: 0.2.0    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 45 + 9 = ?

 
 [2007-02-18 04:31 UTC] cellog (Greg Beaver)
Description: ------------ we need to pass in $pf before using it :) Test script: --------------- Index: Packaging.php =================================================================== RCS file: /repository/pear/PEAR_Command_Packaging/Packaging.php,v retrieving revision 1.17 diff -u -r1.17 Packaging.php --- Packaging.php 20 Jan 2007 12:15:06 -0000 1.17 +++ Packaging.php 18 Feb 2007 04:31:10 -0000 @@ -194,11 +194,11 @@ $pack = new PEAR_Downloader_Package($installer); $pack->setPackageFile($pf); $params[0] = &$pack; - $installer->setOptions(array('installroot' => $instroot, + $installer->setOptions(array('packagingroot' => $instroot, 'nodeps' => true, 'soft' => true)); $installer->setDownloadedPackages($params); $info = $installer->install($params[0], - array('installroot' => $instroot, + array('packagingroot' => $instroot, 'nodeps' => true, 'soft' => true)); $pkgdir = $pf->getPackage() . '-' . $pf->getVersion(); $this->config->set('verbose', $tmp); @@ -222,7 +222,7 @@ // Work out the alias for the channel that this package is in $info['possible_channel'] = ''; - $alias = $this->_getChannelAlias($pf->getChannel(), $pf->getPackage()); + $alias = $this->_getChannelAlias(null, null, $pf); if ($alias != 'PEAR' && $alias != 'PECL') { $info['possible_channel'] = $pf->getChannel() . '/'; } @@ -611,8 +611,12 @@ * @return string Channel alias (e.g. 'PECL') */ - function _getChannelAlias($chan_name, $package_name = null) + function _getChannelAlias($package_name, $chan_name = null, $pf = null) { + if ($pf) { + $chan_name = $pf->getChannel(); + $package_name = $pf->getPackage(); + } switch($chan_name) { case null: case '':

Comments

 [2007-02-18 04:34 UTC] cellog (Greg Beaver)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. I'll just fix both bugs and close them