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

index 3155cde0c2f0aa5a893437f27d31fd52338fe971..a8e92aceb8bceda10959c2a993da61adc6e77d51 100644 (file)
@@ -731,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");
                 }
index 1c2ae32e403d61ba9a67512a335ce220bf69e33d..dddbc09c42b9294d02dfe45a380d96dff936ab29 100644 (file)
   </maintainers>
   <release>
     <version>1.3b4</version>
-    <date>2003-10-30</date>
+    <date>2003-11-17</date>
     <state>beta</state>
     <notes>
 PEAR Installer:
 
 * 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" />