]> granicus.if.org Git - php/commitdiff
fix bug #249 MFH
authorGreg Beaver <cellog@php.net>
Mon, 17 Nov 2003 05:47:51 +0000 (05:47 +0000)
committerGreg Beaver <cellog@php.net>
Mon, 17 Nov 2003 05:47:51 +0000 (05:47 +0000)
pear/PEAR/Installer.php
pear/package-PEAR.xml

index 8e977911cc539546462edcab7f69d3ef740c7717..a8e92aceb8bceda10959c2a993da61adc6e77d51 100644 (file)
@@ -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);
index fad66dde2433e0252b66f27efcf448980a533f14..f0fb01539e00919f33317dd5006e89f66219e92e 100644 (file)
     </maintainer>
   </maintainers>
   <release>
-    <version>1.3b3</version>
-    <date>2003-10-20</date>
+    <version>1.3b4</version>
+    <date>2003-11-17</date>
     <state>beta</state>
     <notes>
-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=&quot;eq&quot; should install the required version, if possible
+* Bug #249 installing from an url doesnt work
 
     </notes>
     <provides type="class" name="OS_Guess" />