#22742 [NEW]: 'pear install' of a PECL package doesn't fail when make fails

From: Date: Mon, 17 Mar 2003 13:00:10 +0000
Subject: #22742 [NEW]: 'pear install' of a PECL package doesn't fail when make fails
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-14361@lists.php.net to get a copy of this message
From: ja at morrdusk dot net Operating system: All PHP version: 4.3.2RC1 PHP Bug Type: PEAR related Bug description: 'pear install' of a PECL package doesn't fail when make fails 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 bug report at http://bugs.php.net/?id=22742&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=22742&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=22742&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=22742&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=22742&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=22742&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=22742&r=support Expected behavior: http://bugs.php.net/fix.php?id=22742&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=22742&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=22742&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=22742&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22742&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=22742&r=dst IIS Stability: http://bugs.php.net/fix.php?id=22742&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=22742&r=gnused

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