Commit: 455dc451ad9671231736f565f64c0973d8b0cf19 Author: Anatol Belski <[email protected]> Mon, 7 Oct 2013 17:53:03 +0200 Parents: 290b6189c9d0476412fc0dd9067d4c84a11df698 Branches: master
Link: http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=455dc451ad9671231736f565f64c0973d8b0cf19 Log: added pre check whether the build hase to be skipped Changed paths: M client/include/PeclExt.php M client/script/pecl.php Diff: diff --git a/client/include/PeclExt.php b/client/include/PeclExt.php index 14e688b..11becfb 100644 --- a/client/include/PeclExt.php +++ b/client/include/PeclExt.php @@ -243,6 +243,11 @@ class PeclExt public function unpack() { + if ($this->tmp_extract_path) { + /* already unpacked */ + return $this->tmp_extract_path; + } + switch ($this->pkg_fmt) { case 'tgz': case 'tbz': @@ -684,6 +689,25 @@ if (!function_exists('rmtools\combinations')) { $this->cleanupNonCoreExtDeps(); } + public function checkSkipBuild() + { + $this->unpack(); + + if ($this->package_xml) { + $oses = $this->getPackageXmlProperty("dependencies", "required", "os"); + if ($oses) { + foreach($oses as $os) { + if ("windows" == (string)$os->name) { + if (isset($os->conflicts)) { + throw new \EXception("Per package.xml not compatible with Windows"); + } + } + } + } + + } + } + public function check() { if (!$this->tmp_extract_path) { @@ -717,6 +741,8 @@ if (!function_exists('rmtools\combinations')) { $this->cleanup(); throw new \Exception("At most PHP '$max_php_ver' required, got '$php_ver'"); } + + } } diff --git a/client/script/pecl.php b/client/script/pecl.php index 350edff..e26f476 100644 --- a/client/script/pecl.php +++ b/client/script/pecl.php @@ -140,6 +140,7 @@ foreach ($builds as $build_name) { try { $ext = new rm\PeclExt($pkg_path, $build); $mailer = new rm\PeclMail($pkg_path, $aggregate_mail); + $ext->checkSkipBuild(); } catch (Exception $e) { echo 'Error: ' . $e->getMessage() . PHP_EOL; -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
