php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22742 'pear install' of a PECL package doesn't fail when make fails
Submitted: 2003-03-17 07:00 UTC Modified: 2003-03-27 08:00 UTC
From: ja at morrdusk dot net Assigned:
Status: Closed Package: PEAR related
PHP Version: 4.3.2RC1 OS: All
Private report: No CVE-ID: None
 [2003-03-17 07:00 UTC] ja at morrdusk dot net
If make fails when installing a PECL package with 'pear install' the error won't be reported to the user and it will say 'install ok: ...' in the end even though the package wasn't installed ok, the extension failed to build and hence wasn't copied to the extension directory but the rest of the files in the package (like the documentation) are copied.

If the user has set a higher verbosity level than the default one, it's possible to notice the error by watching the output during the build process.

The below patch corrects this.

--- Builder.php.org     Mon Mar 17 14:08:48 2003
+++ Builder.php Mon Mar 17 14:08:53 2003
@@ -252,9 +252,13 @@
         }
         foreach ($to_run as $cmd) {
             $err = $this->_runCommand($cmd, $callback);
-            if (PEAR::isError($err) && !$err) {
+            if (PEAR::isError($err)) {
                 chdir($old_cwd);
                 return $err;
+            }
+            if (!$err) {
+                chdir($old_cwd);
+                return $this->raiseError("`$cmd' failed");
             }
         }
         if (!($dp = opendir("modules"))) {

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-27 08:00 UTC] mj@php.net
This bug has been fixed in CVS. The changes will be part of the next release.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Oct 26 11:03:33 2021 UTC