From: Pierre Joye Date: Thu, 26 Jun 2003 08:45:51 +0000 (+0000) Subject: - MFH X-Git-Tag: php-4.3.3RC2~246 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9a68a887f04168f8afc5b1a24d3e0c3dc39b9abf;p=php - MFH --- diff --git a/pear/PEAR/Command/Remote.php b/pear/PEAR/Command/Remote.php index b3f1e14315..9d23dc7391 100644 --- a/pear/PEAR/Command/Remote.php +++ b/pear/PEAR/Command/Remote.php @@ -334,7 +334,8 @@ parameter. 'border' => 1, 'headline' => array('Package', 'Version', 'Size'), ); - foreach ($latest as $package => $info) { + foreach ($latest as $pkg => $info) { + $package = strtolower($pkg); if (!isset($inst[$package])) { // skip packages we don't have installed continue; @@ -354,7 +355,7 @@ parameter. } else { $fs = " -"; // XXX center instead } - $data['data'][] = array($package, $version, $fs); + $data['data'][] = array($pkg, $version, $fs); } if (empty($data['data'])) { $this->ui->outputData('No upgrades available'); diff --git a/pear/PEAR/Registry.php b/pear/PEAR/Registry.php index 252b0e7f58..b5a29f6d4c 100644 --- a/pear/PEAR/Registry.php +++ b/pear/PEAR/Registry.php @@ -98,6 +98,18 @@ class PEAR_Registry extends PEAR $this->statedir = $pear_install_dir.$ds.'.registry'; $this->filemap = $pear_install_dir.$ds.'.filemap'; $this->lockfile = $pear_install_dir.$ds.'.lock'; + + // XXX Compatibility code should be removed in the future + // rename all registry files if any to lowercase + if (!OS_WINDOWS && $handle = opendir($this->statedir)) { + $dest = $this->statedir . DIRECTORY_SEPARATOR; + while (false !== ($file = readdir($handle))) { + if (preg_match('/^.*[A-Z].*\.reg$/', $file)) { + rename($dest . $file, $dest . strtolower($file)); + } + } + closedir($handle); + } if (!file_exists($this->filemap)) { $this->rebuildFileMap(); } @@ -155,7 +167,7 @@ class PEAR_Registry extends PEAR */ function _packageFileName($package) { - return "{$this->statedir}/{$package}.reg"; + return $this->statedir . DIRECTORY_SEPARATOR . strtolower($package) . '.reg'; } // }}} diff --git a/pear/package-PEAR.xml b/pear/package-PEAR.xml index f76e9d2d5c..5aa793ba18 100644 --- a/pear/package-PEAR.xml +++ b/pear/package-PEAR.xml @@ -37,12 +37,13 @@ - 1.2 - stable - 2003-01-10 + 1.2b2 + beta + 2003-06-23 * Changed license from PHP 2.02 to 3.0 * Added support for optional dependencies +* Made upgrade and uninstall package case insensitive * pear makerpm, now works and generates a better system independant spec file * pear install|build <pecl-package>, now exposes the compilation progress * Added new pear bundle command, which downloads and uncompress a <pecl-package>.