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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ja at morrdusk dot net
New email:
PHP Version: OS:

 

 [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-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 02:01:29 2024 UTC