]> git.pld-linux.org Git - packages/php-pear-PEAR.git/commitdiff
- from gentoo
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 6 Mar 2006 23:16:47 +0000 (23:16 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    php-pear-PEAR-packagingroot.patch -> 1.1

php-pear-PEAR-packagingroot.patch [new file with mode: 0644]

diff --git a/php-pear-PEAR-packagingroot.patch b/php-pear-PEAR-packagingroot.patch
new file mode 100644 (file)
index 0000000..5ed7f1c
--- /dev/null
@@ -0,0 +1,46 @@
+--- PEAR-1.4.6/PEAR/Installer.php      2006/01/06 04:47:36     1.224
++++ PEAR-1.4.6/PEAR/Installer.php      2006/01/16 12:24:23     1.225
+@@ -1329,7 +1329,11 @@
+             }
+             $dest = $ext['dest'];
+             $this->log(1, "Installing '$ext[file]'");
+-            $copyto = $this->_prependPath($dest, $this->installroot);
++            $packagingroot = '';
++            if (isset($this->_options['packagingroot'])) {
++                $packagingroot = $this->_options['packagingroot'];
++            }
++            $copyto = $this->_prependPath($dest, $packagingroot);
+             $copydir = dirname($copyto);
+             if (!@is_dir($copydir)) {
+                 if (!$this->mkDirHier($copydir)) {
+--- PEAR-1.4.6/PEAR/Command/Install.php        2006/01/06 04:47:36     1.112
++++ PEAR-1.4.6/PEAR/Command/Install.php        2006/01/16 12:24:23     1.113
+@@ -543,16 +543,19 @@
+                     $reg = &$this->config->getRegistry();
+                 }
+                 $pkg = &$reg->getPackage($param->getPackage(), $param->getChannel());
+-                $pkg->setConfig($this->config);
+-                if ($list = $pkg->listPostinstallScripts()) {
+-                    $pn = $reg->parsedPackageNameToString(array('channel' =>
+-                        $param->getChannel(), 'package' => $param->getPackage()), true);
+-                    $extrainfo[] = $pn . ' has post-install scripts:';
+-                    foreach ($list as $file) {
+-                        $extrainfo[] = $file;
++                // $pkg may be NULL if install is a 'fake' install via --packagingroot
++                if (is_object($pkg)) {
++                    $pkg->setConfig($this->config);
++                    if ($list = $pkg->listPostinstallScripts()) {
++                        $pn = $reg->parsedPackageNameToString(array('channel' =>
++                           $param->getChannel(), 'package' => $param->getPackage()), true);
++                        $extrainfo[] = $pn . ' has post-install scripts:';
++                        foreach ($list as $file) {
++                            $extrainfo[] = $file;
++                        }
++                        $extrainfo[] = 'Use "pear run-scripts ' . $pn . '" to run';
++                        $extrainfo[] = 'DO NOT RUN SCRIPTS FROM UNTRUSTED SOURCES';
+                     }
+-                    $extrainfo[] = 'Use "pear run-scripts ' . $pn . '" to run';
+-                    $extrainfo[] = 'DO NOT RUN SCRIPTS FROM UNTRUSTED SOURCES';
+                 }
+             } else {
+                 return $this->raiseError("$command failed");
This page took 0.036568 seconds and 4 git commands to generate.