From: Greg Beaver Date: Mon, 17 Nov 2003 05:47:51 +0000 (+0000) Subject: fix bug #249 MFH X-Git-Tag: php-4.3.5RC1~199 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7765e06ef732cd4f5d89a62a7861a442064e610b;p=php fix bug #249 MFH --- diff --git a/pear/PEAR/Installer.php b/pear/PEAR/Installer.php index 8e977911cc..a8e92aceb8 100644 --- a/pear/PEAR/Installer.php +++ b/pear/PEAR/Installer.php @@ -506,7 +506,9 @@ class PEAR_Installer extends PEAR_Common case 'delete': break; case 'installed_as': - unset($this->pkginfo['filelist'][$data[0]]['installed_as']); + if (isset($this->pkginfo['filelist'])) { + unset($this->pkginfo['filelist'][$data[0]]['installed_as']); + } if (isset($this->pkginfo['filelist']['dirtree'][dirname($data[1])])) { unset($this->pkginfo['filelist']['dirtree'][dirname($data[1])]); while(!empty($data[3]) && $data[3] != '/' && $data[3] != '\\' @@ -729,6 +731,24 @@ class PEAR_Installer extends PEAR_Common if (!is_file($pkgfile)) { $origpkgfile = $pkgfile; $pkgfile = $this->extractDownloadFileName($pkgfile, $version); + if (preg_match('#^(http|ftp)://#', $pkgfile)) { + $pkgfile = $this->_downloadFile($pkgfile, $config, $options, + $errors, $version, $origpkgfile, + $state); + if (PEAR::isError($pkgfile)) { + return $pkgfile; + } + $tempinfo = $this->infoFromAny($pkgfile); + if (isset($options['alldeps']) || isset($options['onlyreqdeps'])) { + // ignore dependencies if there are any errors + if (!PEAR::isError($tempinfo)) { + $mywillinstall[strtolower($tempinfo['package'])] = @$tempinfo['release_deps']; + } + } + $installpackages[] = array('pkg' => $tempinfo['package'], + 'file' => $pkgfile, 'info' => $tempinfo); + continue; + } if (!$this->validPackageName($pkgfile)) { return $this->raiseError("Package name '$pkgfile' not valid"); } @@ -1314,11 +1334,6 @@ class PEAR_Installer extends PEAR_Common $code = $depchecker->callCheckMethod($error, $dep); if ($code) { if (isset($dep['optional']) && $dep['optional'] == 'yes') { -/* die ugly hack die - // Ugly hack to adjust the error messages - $error = str_replace('requires ', '', $error); - $error = ucfirst($error); - $error = $error . ' is recommended to utilize some features.';*/ $optional_deps[] = array($dep, $code, $error); } else { $failed_deps[] = array($dep, $code, $error); diff --git a/pear/package-PEAR.xml b/pear/package-PEAR.xml index fad66dde24..f0fb01539e 100644 --- a/pear/package-PEAR.xml +++ b/pear/package-PEAR.xml @@ -47,19 +47,14 @@ - 1.3b3 - 2003-10-20 + 1.3b4 + 2003-11-17 beta -OS/Guess.php: -* Bug #25174 Wrong handling of readlink() in OS/Guess.php - PEAR Installer: -* Bug #25413 Add local installed packages to list-all (Christian DickMann) -* Bug #23221 Pear installer - extension re-install segfault -* Better error detecting and reporting in "install/upgrade" -* Various other bugfixes and cleanups +* Bug #171 --alldeps with a rel="eq" should install the required version, if possible +* Bug #249 installing from an url doesnt work