'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;
} 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');
$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();
}
*/
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';
}
// }}}
</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>.