com web/rmtools: improve error messages and log info: client/include/PickleBuildVC.php client/include/PickleExt.php
| From: | Anatol Belski | Date: | Tue, 12 May 2015 17:04:59 +0000 |
| Subject: | com web/rmtools: improve error messages and log info: client/include/PickleBuildVC.php client/include/PickleExt.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-25967@lists.php.net to get a copy of this message | ||
Commit: 62af00562ae323aad980d2ef049d085643c618d0
Author: Anatol Belski <ab@php.net> Tue, 12 May 2015 19:04:59 +0200
Parents: 9b13c80bc00a19f9769fbb9d87148184df32c78f
Branches: master pecl_legacy
Link: http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=62af00562ae323aad980d2ef049d085643c618d0
Log:
improve error messages and log info
Changed paths:
M client/include/PickleBuildVC.php
M client/include/PickleExt.php
Diff:
diff --git a/client/include/PickleBuildVC.php b/client/include/PickleBuildVC.php
index 8a372f6..55f578f 100644
--- a/client/include/PickleBuildVC.php
+++ b/client/include/PickleBuildVC.php
@@ -142,14 +142,8 @@ class PickleBuildVC
}
- /* XXX read the configure options from the extconfig, create the options file to feed pickle */
- public function build(PickleExt $ext)
+ public function getPickleCmdToRun(PickleExt $ext)
{
- $cmd = $this->pickle_cmd;
- $old_cwd = getcwd();
-
- chdir(TMP_DIR);
-
$conf_opts = $ext->getConfigureOpts();
if ($conf_opts && file_exists($conf_opts)) {
$ext_config_opt = "--with-configure-options=$conf_opts";
@@ -167,6 +161,20 @@ class PickleBuildVC
$cmd = $this->pickle_cmd . " " . $opts;
+ return $cmd;
+
+ }
+
+
+ /* XXX read the configure options from the extconfig, create the options file to feed pickle */
+ public function build(PickleExt $ext)
+ {
+ $old_cwd = getcwd();
+
+ chdir(TMP_DIR);
+
+ $cmd = $this->getPickleCmdToRun($ext);
+
$ret = exec_single_log($cmd, NULL, $this->env);
$ext->cleanConfigureOpts();
diff --git a/client/include/PickleExt.php b/client/include/PickleExt.php
index 1c1f894..41a5455 100644
--- a/client/include/PickleExt.php
+++ b/client/include/PickleExt.php
@@ -34,7 +34,7 @@ class PickleExt
$ret = exec_single_log($cmd, NULL, $this->build->getEnv());
if ($ret["return_value"]) {
- throw new \Exception($ret["log"]);
+ throw new \Exception("'$cmd' resulted error: '" .
$ret["log"] . "'");
}
if (!preg_match(",Package name\s+\|\s+([^\s]+)\s+\|,", $ret["log"], $m)) {