logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

cvs: pear-core(PEAR_1_4) / package-PEAR.xml package2.xml /PEAR Downloader.: msg#00053

Subject: cvs: pear-core(PEAR_1_4) / package-PEAR.xml package2.xml /PEAR Downloader.php
pajoye          Fri Jun 16 12:35:13 2006 UTC

  Modified files:              (Branch: PEAR_1_4)
    /pear-core/PEAR     Downloader.php 
    /pear-core  package-PEAR.xml package2.xml 
  Log:
  - MFH: use download_dir
  - MFH #7090, PEAR_Downloader mustn't contact pear server when installing
     local package file
  
  
http://cvs.php.net/viewcvs.cgi/pear-core/PEAR/Downloader.php?r1=1.99.2.1&r2=1.99.2.2&diff_format=u
Index: pear-core/PEAR/Downloader.php
diff -u pear-core/PEAR/Downloader.php:1.99.2.1 
pear-core/PEAR/Downloader.php:1.99.2.2
--- pear-core/PEAR/Downloader.php:1.99.2.1      Thu May 25 22:00:05 2006
+++ pear-core/PEAR/Downloader.php       Fri Jun 16 12:35:12 2006
@@ -18,7 +18,7 @@
  * @author     Martin Jansen <mj@xxxxxxx>
  * @copyright  1997-2006 The PHP Group
  * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
- * @version    CVS: $Id: Downloader.php,v 1.99.2.1 2006/05/25 22:00:05 cellog 
Exp $
+ * @version    CVS: $Id: Downloader.php,v 1.99.2.2 2006/06/16 12:35:12 pajoye 
Exp $
  * @link       http://pear.php.net/package/PEAR
  * @since      File available since Release 1.3.0
  */
@@ -132,7 +132,7 @@
      * @access private
      */
     var $_errorStack = array();
-    
+
     /**
      * @var boolean
      * @access private
@@ -293,29 +293,37 @@
                 $this->pushError('Package "' . $param . '" is not valid',
                     PEAR_INSTALLER_SKIPPED);
             } else {
-                if ($params[$i] && 
!isset($channelschecked[$params[$i]->getChannel()]) &&
-                      !isset($this->_options['offline'])) {
-                    $channelschecked[$params[$i]->getChannel()] = true;
-                    PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
-                    if (!class_exists('System')) {
-                        require_once 'System.php';
+                do {
+                    if ($params[$i] && $params[$i]->getType() == 'local') {
+                        // bug #7090
+                        // skip channel.xml check for local packages
+                        break;
                     }
-                    $curchannel = 
&$this->_registry->getChannel($params[$i]->getChannel());
-                    if (PEAR::isError($curchannel)) {
+                    if ($params[$i] && 
!isset($channelschecked[$params[$i]->getChannel()]) &&
+                          !isset($this->_options['offline'])) {
+                        $channelschecked[$params[$i]->getChannel()] = true;
+                        PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
+                        if (!class_exists('System')) {
+                            require_once 'System.php';
+                        }
+                        $curchannel = 
&$this->_registry->getChannel($params[$i]->getChannel());
+                        if (PEAR::isError($curchannel)) {
+                            PEAR::staticPopErrorHandling();
+                            return $this->raiseError($curchannel);
+                        }
+                        $a = $this->downloadHttp('http://' . 
$params[$i]->getChannel() .
+                            '/channel.xml', $this->ui,
+                            System::mktemp(array('-t' . 
$this->getDownloadDir())), null, $curchannel->lastModified());
+
                         PEAR::staticPopErrorHandling();
-                        return $this->raiseError($curchannel);
-                    }
-                    $a = $this->downloadHttp('http://' . 
$params[$i]->getChannel() .
-                        '/channel.xml', $this->ui,
-                        System::mktemp(array('-d')), null, 
$curchannel->lastModified());
-                    PEAR::staticPopErrorHandling();
-                    if (PEAR::isError($a) || !$a) {
-                        continue;
+                        if (PEAR::isError($a) || !$a) {
+                                break;
+                        }
+                        $this->log(0, 'WARNING: channel "' . 
$params[$i]->getChannel() . '" has ' .
+                            'updated its protocols, use "channel-update ' . 
$params[$i]->getChannel() .
+                            '" to update');
                     }
-                    $this->log(0, 'WARNING: channel "' . 
$params[$i]->getChannel() . '" has ' .
-                        'updated its protocols, use "channel-update ' . 
$params[$i]->getChannel() .
-                        '" to update');
-                }
+                } while (false);
                 if ($params[$i] && !isset($this->_options['downloadonly'])) {
                     if (isset($this->_options['packagingroot'])) {
                         $checkdir = $this->_prependPath(
@@ -1113,7 +1121,7 @@
      */
     function sortPkgDeps(&$packages, $uninstall = false)
     {
-        $uninstall ? 
+        $uninstall ?
             $this->sortPackagesForUninstall($packages) :
             $this->sortPackagesForInstall($packages);
     }
@@ -1356,7 +1364,7 @@
             $config = &PEAR_Config::singleton();
         }
         $proxy_host = $proxy_port = $proxy_user = $proxy_pass = '';
-        if ($config->get('http_proxy')&& 
+        if ($config->get('http_proxy')&&
               $proxy = parse_url($config->get('http_proxy'))) {
             $proxy_host = @$proxy['host'];
             if (isset($proxy['scheme']) && $proxy['scheme'] == 'https') {
http://cvs.php.net/viewcvs.cgi/pear-core/package-PEAR.xml?r1=1.352.2.12&r2=1.352.2.13&diff_format=u
Index: pear-core/package-PEAR.xml
diff -u pear-core/package-PEAR.xml:1.352.2.12 
pear-core/package-PEAR.xml:1.352.2.13
--- pear-core/package-PEAR.xml:1.352.2.12       Thu Jun  8 22:27:10 2006
+++ pear-core/package-PEAR.xml  Fri Jun 16 12:35:13 2006
@@ -91,6 +91,9 @@
   * fix Bug #7842: package-dependencies wrong type display with package 1.0 
   * fix an issue in the better state detection
   * fix typo in pickle command that would allow pickling of non-PECL 
package.xml
+  * implement Request #7090: PEAR_Downloader mustn't contact pear server
+    when installing local package file
+  * implement Request #7844: download_dir and temp_dir configuration option
   * check pearinstaller dependency prior to validating package.xml 2.0
   </notes>
   <provides type="class" name="OS_Guess"/>
http://cvs.php.net/viewcvs.cgi/pear-core/package2.xml?r1=1.246.2.12&r2=1.246.2.13&diff_format=u
Index: pear-core/package2.xml
diff -u pear-core/package2.xml:1.246.2.12 pear-core/package2.xml:1.246.2.13
--- pear-core/package2.xml:1.246.2.12   Thu Jun  8 22:27:10 2006
+++ pear-core/package2.xml      Fri Jun 16 12:35:13 2006
@@ -96,6 +96,9 @@
   * fix Bug #7842: package-dependencies wrong type display with package 1.0 
   * fix an issue in the better state detection
   * fix typo in pickle command that would allow pickling of non-PECL 
package.xml
+  * implement Request #7090: PEAR_Downloader mustn't contact pear server
+    when installing local package file
+  * implement Request #7844: download_dir and temp_dir configuration option
   * check pearinstaller dependency prior to validating package.xml 2.0
  </notes>
  <contents>



<Prev in Thread] Current Thread [Next in Thread>