#22742 [Opn->Csd]: 'pear install' of a PECL package doesn't fail when make fails

From: Date: Thu, 27 Mar 2003 14:00:36 +0000
Subject: #22742 [Opn->Csd]: 'pear install' of a PECL package doesn't fail when make fails
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-14676@lists.php.net to get a copy of this message
ID: 22742 Updated by: mj@php.net Reported By: ja at morrdusk dot net -Status: Open +Status: Closed Bug Type: PEAR related Operating System: All PHP Version: 4.3.2RC1 New Comment: This bug has been fixed in CVS. The changes will be part of the next release. Previous Comments: ------------------------------------------------------------------------ [2003-03-17 07:00:10] 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"))) { ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22742&edit=1

« previous php.pear.dev (#14676) next »