SOURCES: php-pear-PEAR-packagingroot.patch (NEW) - from gentoo
glen
glen at pld-linux.org
Tue Mar 7 00:16:53 CET 2006
Author: glen Date: Mon Mar 6 23:16:53 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- from gentoo
---- Files affected:
SOURCES:
php-pear-PEAR-packagingroot.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/php-pear-PEAR-packagingroot.patch
diff -u /dev/null SOURCES/php-pear-PEAR-packagingroot.patch:1.1
--- /dev/null Tue Mar 7 00:16:53 2006
+++ SOURCES/php-pear-PEAR-packagingroot.patch Tue Mar 7 00:16:47 2006
@@ -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");
================================================================
More information about the pld-cvs-commit
mailing list