logo       
Google Custom Search
    AddThis Social Bookmark Button

cvs: pearweb /public_html go-pear: msg#00024

Subject: cvs: pearweb /public_html go-pear
pajoye          Fri Jun  9 01:58:15 2006 UTC

  Modified files:              
    /pearweb/public_html        go-pear 
  Log:
  - use the new temp_dir option
  - bump to MDB2 for PFC
  
  
http://cvs.php.net/viewcvs.cgi/pearweb/public_html/go-pear?r1=1.91&r2=1.92&diff_format=u
Index: pearweb/public_html/go-pear
diff -u pearweb/public_html/go-pear:1.91 pearweb/public_html/go-pear:1.92
--- pearweb/public_html/go-pear:1.91    Thu Jun  8 22:55:59 2006
+++ pearweb/public_html/go-pear Fri Jun  9 01:58:15 2006
@@ -18,7 +18,7 @@
 # |          Pierre-Alain Joye <pierre@xxxxxxx>                          |
 # |          Greg Beaver <cellog@xxxxxxx>                                |
 # +----------------------------------------------------------------------+
-# $Id: go-pear,v 1.91 2006/06/08 22:55:59 pajoye Exp $
+# $Id: go-pear,v 1.92 2006/06/09 01:58:15 pajoye Exp $
 #
 # Automatically download all the files needed to run the "pear" command
 # (the PEAR package installer).  Requires PHP 4.1.0 or newer.
@@ -193,7 +193,7 @@
 }
 
 $pfc_packages = array(
-    'DB',
+    'MDB2',
     'Net_Socket',
     'Net_SMTP',
     'Mail',
@@ -208,7 +208,7 @@
     'doc_dir' => 'Documentation base directory',
     'data_dir' => 'Data base directory',
     'test_dir' => 'Tests base directory',
-    'tmp_dir' => 'Temporary files directory'
+    'temp_dir' => 'Temporary files directory'
 );
 
 if(!WEBINSTALLER && WINDOWS){
@@ -264,7 +264,7 @@
                 'doc_dir'   => $doc_dir,
                 'data_dir'  => $data_dir,
                 'test_dir'  => $test_dir,
-                'tmp_dir'   => '$prefix/temp',
+                'temp_dir'   => '$prefix/temp',
                 'cache_dir' => '$php_dir/cache',
                 'cache_ttl' => 300,
                 'webfrontend_file' => '$prefix/index.php',
@@ -457,12 +457,14 @@
         $var = $config_vars[(int)$tmp];
         $desc = $config_desc[$var];
         $current = $$var;
+
         if(WIN32GUI){
             $tmp = win32BrowseForFolder("$desc [$current] :");
         } else {
             print "$desc [$current] : ";
             $tmp = trim(fgets($tty, 1024));
         }
+
         $old = $$var;
         if(WINDOWS && $var=='php_bin' ){
             if(file_exists($tmp.DIRECTORY_SEPARATOR.'php.exe')){
@@ -520,10 +522,10 @@
 ####
 # Temp stuff
 ####
-if (!empty($tmp_dir)) {
-    $_found = tmp_dir($tmp_dir);
+if (!empty($temp_dir)) {
+    $_found = temp_dir($temp_dir);
 } else {
-    $_found = tmp_dir();
+    $_found = temp_dir();
 }
 
 if (!$_found) {
@@ -535,8 +537,8 @@
 
 ";
 
-    if (!empty($tmp_dir)) {
-        print "'$tmp_dir' was given.";
+    if (!empty($temp_dir)) {
+        print "'$temp_dir' was given.";
     }
     exit();
 }
@@ -559,7 +561,6 @@
 rm_rf($ptmp);
 mkdir_p($ptmp, 0700);
 $ok = @chdir($ptmp);
-$tmp_dir = $ptmp;
 
 foreach ($config_vars as $var) {
     $dir = $$var;
@@ -590,7 +591,8 @@
 # Download
 ####
 
-ini_set("include_path", $ptmp);
+//ini_set("include_path", $ptmp);
+set_include_path('/usr/local/lib/php:.');
 
 if (!extension_loaded('zlib') && !WEBINSTALLER) { // In Web context we could 
be in multithread env which makes dl() end up with a fatal error.
     if (WINDOWS) {
@@ -752,21 +754,35 @@
 
 $tarball['PEAR'] = 'package.xml'; // :-)
 
+// Default for sig_bin
+putenv('PHP_PEAR_SIG_BIN=""');
+// Default for sig_keydir
+putenv('PHP_PEAR_SIG_KEYDIR=""');
+putenv('PHP_PEAR_DOWNLOAD_DIR=' . $temp_dir . '/download');
+putenv('PHP_PEAR_TEMP_DIR=' . $temp_dir);
+
+$wd= getcwd();
+chdir($prefix);
 include_once "PEAR.php";
 include_once "PEAR/Config.php";
 include_once "PEAR/Command.php";
 include_once "PEAR/Registry.php";
+chdir($wd);
+
 
 if (WEBINSTALLER || isset($_SERVER['argv'][1]) && $_SERVER['argv'][1] == 
'local') {
     $config = &PEAR_Config::singleton($prefix."/pear.conf", '');
 } else {
     $config = &PEAR_Config::singleton();
-};
+}
+
+
 $config->set('preferred_state', 'stable');
 foreach ($config_vars as $var) {
     $config->set($var, $$var);
 }
-
+$config->set('download_dir', $temp_dir . '/download');
+$config->set('temp_dir', $temp_dir);
 $config->store();
 
 $registry = new PEAR_Registry($php_dir);
@@ -1171,12 +1187,12 @@
 /*
  * Fixes for winXP/wrong tmp set by Urs Gehrig (urs@xxxxxxxxx)
  */
-function tmp_dir($default=false)
+function temp_dir($default=false)
 {
     global $ptmp, $prefix;
 
     if ($default) {
-        if (!@is_dir($default)) {
+         if (!@is_dir($default)) {
             if (!mkdir_p($default)) {
                 return false;
             }
@@ -1262,7 +1278,7 @@
         }
         $_ENV['TMPDIR'] = $_ENV['TEMP'] = $prefix.'/tmp';
     }
-    $tmp_dir = $ptmp = $_temp;
+    $temp_dir = $ptmp = $_temp;
 }
 
 // }}}
@@ -1306,7 +1322,7 @@
         $doc_dir   = '$php_dir\docs';
         $data_dir  = '$php_dir\data';
         $test_dir  = '$php_dir\tests';
-        $tmp_dir   = '$prefix\temp';
+        $temp_dir   = '$prefix\temp';
 
         /*
          * Detects php.exe
@@ -1349,7 +1365,7 @@
         $doc_dir   = '$php_dir/docs';
         $data_dir  = '$php_dir/data';
         $test_dir  = '$php_dir/tests';
-        $tmp_dir   = '$prefix/temp';
+        $temp_dir   = '$prefix/temp';
 
         // check if the user has installed PHP with PHP or GNU layout
         if (@is_dir("$prefix/lib/php/.registry")) {
@@ -2224,7 +2240,7 @@
  */
 function win32CreateRegEnv()
 {
-    global $prefix, $bin_dir, $php_dir, $php_bin, $doc_dir, $data_dir, 
$test_dir, $tmp_dir;
+    global $prefix, $bin_dir, $php_dir, $php_bin, $doc_dir, $data_dir, 
$test_dir, $temp_dir;
     $nl = "\r\n";
     $reg ='REGEDIT4'.$nl.
             '[HKEY_CURRENT_USER\Environment]'.$nl.

-- 
PEAR CVS Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>