diff options
-rw-r--r-- | pear/PEAR/Command/Remote.php | 5 | ||||
-rw-r--r-- | pear/PEAR/Registry.php | 30 | ||||
-rw-r--r-- | pear/package-PEAR.xml | 7 |
3 files changed, 20 insertions, 22 deletions
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 6450d20202..16a9b497d4 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,23 +167,7 @@ class PEAR_Registry extends PEAR */ function _packageFileName($package) { - if (is_file("{$this->statedir}/{$package}.reg")) { - return "{$this->statedir}/{$package}.reg"; - } - /** - * Iterate through the directory to find the matching - * registry file, even if it has been provided in - * another case (foobar vs. FooBar) - */ - $package = strtolower($package); - if ($handle = opendir($this->statedir)) { - while (false !== ($file = readdir($handle))) { - if (strtolower($file) == $package . ".reg") { - return "{$this->statedir}/{$file}"; - } - } - closedir($handle); - } + 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 @@ </maintainer> </maintainers> <release> - <version>1.2</version> - <state>stable</state> - <date>2003-01-10</date> + <version>1.2b2</version> + <state>beta</state> + <date>2003-06-23</date> <notes> * 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>. |