Prechádzať zdrojové kódy

prevent PEAR installer from touching target directory during installation

Michael van Elst 22 rokov pred
rodič
commit
1331c58c47
2 zmenil súbory, kde vykonal 31 pridanie a 1 odobranie
  1. 30 0
      php/php.patch
  2. 1 1
      php/php.spec

+ 30 - 0
php/php.patch

@@ -21,3 +21,33 @@
  
              
    save_old_LDFLAGS=$LDFLAGS
+--- php-4.3.2/pear/PEAR/Installer.php.dist	2003-07-28 13:57:01.000000000 +0200
++++ php-4.3.2/pear/PEAR/Installer.php	2003-07-28 14:00:12.000000000 +0200
+@@ -115,7 +115,6 @@
+         parent::PEAR_Common();
+         $this->setFrontendObject($ui);
+         $this->debug = $this->config->get('verbose');
+-        $this->registry = &new PEAR_Registry($this->config->get('php_dir'));
+     }
+ 
+     // }}}
+@@ -786,6 +785,19 @@
+ 
+     function checkDeps(&$pkginfo)
+     {
++        if ($this->registry == null) {
++            $php_dir = $this->config->get('php_dir');
++            if (isset($options['installroot'])) {
++                if (substr($options['installroot'], -1) == DIRECTORY_SEPARATOR) {
++                    $options['installroot'] = substr($options['installroot'], 0, -1);
++                }
++                $this->installroot = $options['installroot'];
++                $php_dir = $this->_prependPath($php_dir, $this->installroot);
++            } else {
++                $this->installroot = '';
++            }
++            $this->registry = &new PEAR_Registry($php_dir);
++        }
+         $depchecker = &new PEAR_Dependency($this->registry);
+         $error = $errors = '';
+         $failed_deps = array();

+ 1 - 1
php/php.spec

@@ -33,7 +33,7 @@ Distribution: OpenPKG [BASE]
 Group:        Language
 License:      PHP
 Version:      4.3.2
-Release:      20030725
+Release:      20030728
 
 #   package options (analog to apache.spec)
 %option       with_calendar      no