Re: [PIRE] [ANNOUNCEMENT] PEAR-1.4.8 (stable) Released.

From: Date: Mon, 06 Mar 2006 02:26:57 +0000
Subject: Re: [PIRE] [ANNOUNCEMENT] PEAR-1.4.8 (stable) Released.
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-41670@lists.php.net to get a copy of this message
Not sure that was checked, as I got no answer -------- Original Message -------- Subject: Re: [PEAR-BUG] Bug #7015 [Ana->Csd]: install a package.tgz with unknown channel, fatal error in PEAR/Registry.php Date: Sun, 05 Mar 2006 09:47:42 +0100 From: bertrand Gugger <bertrand@toggg.com> Reply-To: bertrand@toggg.com To: cellog@php.net CC: stig@php.net, cox@idecnet.com, pierre.php@gmail.com, tim@timj.co.uk References: <20060304152627.77304.qmail@pb12.pair.com> To be damned sure, I've been inspecting all the uses of PEAR_Registry::getChannel() * PEAR_Command_Remote * line 159-168 function _checkChannelForStatus($channel, $chan) {
      if (PEAR::isError($chan)) {
          $this->raiseError($chan);
      }
      if (!is_a($chan, 'PEAR_ChannelFile')) {
          return $this->raiseError('Internal corruption error: invalid channel "' .
              $channel . '"');
      }
I wonder if that should not be better function _checkChannelForStatus($channel, $chan) {
      if (PEAR::isError($chan)) {
          return $chan;
      }
... but you perhaps want a "conclusion" message * PEAR_Installer * line 353-358
                          $chan = $this->_registry->getChannel($channel);
                          if ($chan) {
                              $to = $chan->getServer();
                          } else {
                              $to = $this->config->get($a['to'], null, $channel);
                          }
Errmmm.... * PEAR_Registry * The private method _getChannel() may return false, so either correct its last return lines 1359-1360
      return $ch;
} to
      return PEAR::raiseError('Unknown channel ' . $channel);
} or correct *1* , *2* and *3* *1* line 527 function _getAlias($channel) will eventually return a string, false or PEAR_Error then I wonder what line 938 will do:
      $file = $this->_getChannelAliasFileName($this->_getAlias($channel));
as line 487-491: function _getChannelAliasFileName($alias) {
      return $this->channelsdir . DIRECTORY_SEPARATOR . '.alias' .
            DIRECTORY_SEPARATOR . str_replace('/', '_', strtolower($alias)) . '.txt';
} *2* line 841-844
          $checker = $this->_getChannel($channel->getName());
          if (PEAR::isError($channel)) {
              return $channel;
          }
should be
          $checker = $this->_getChannel($channel->getName());
          if (!$checker || PEAR::isError($checker)) {
              return $checker;
          }
*3* line 1807-1819 function &getChannels() {
      $ret = array();
      if (PEAR::isError($e = $this->_lock(LOCK_SH))) {
          return $e;
      }
      foreach ($this->_listChannels() as $channel) {
          $e = &$this->_getChannel($channel);
          if (PEAR::isError($e)) {
              continue;
          }
          $ret[] = $e;
      }
should be: ...
          if (!$e || PEAR::isError($e)) {
              continue;
          }
... I hope I'm not too wrong ... and that serves. -- toggg PEAR Announce wrote: >The new PEAR package PEAR-1.4.8 (stable) has been released at http://pear.php.net/. > >Release 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 > >Package Info >------------- >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 > >Related Links >------------- >Package home: http://pear.php.net/package/PEAR > Changelog: http://pear.php.net/package/PEAR/download/1.4.8 > Download: http://pear.php.net/get/PEAR-1.4.8.tgz > >Authors >------------- >Stig Bakken <stig@php.net> (lead) >Thomas V.V.Cox <cox@idecnet.com> (lead) >Martin Jansen <mj@php.net> (helper) >Pierre-Alain Joye (lead) >Greg Beaver (lead) >bertrand Gugger <bertrand@toggg.com> (helper) >Tim Jackson (helper) > > >

« previous php.pear.dev (#41670) next »