MattDees/pear-core — comment on commit 6151eae601524b1dd6faca117d9603b7f3fd6651
File:  line 0
By MattDees:

We found an issue on some of our systems at work that

1. json & apd (old modules) were uninstallable due to some issues with the way that these files are handled

test:

pecl install apd

result:

root@matt [~/tmp/pear]# pecl install apd
downloading apd-1.0.1.tgz ...
Starting to download apd-1.0.1.tgz (36,643 bytes)
..........done: 36,643 bytes
15 source files, building
running: phpize
Cannot find config.m4.
Make sure that you run '/usr/local/cpanel/3rdparty/bin/phpize' in the top level source directory of the module

ERROR: `phpize' failed

some work showed that it was attempting to work out of:

string(24) "/root/tmp/pear/tmpB3CXko"

which just contained the package.xml file, the $tmpdir directory defined above contained:

"/root/tmp/pear/pearZCYRGP"

which had the correct sources

This was due to $dir not being set correctly in Builder.php (which is propagated from this change) when a v1 PEAR PAckageFile was not used correctly. This change should resolve this. It appears that these are always built in randomly-generated directories so this change *should* be fine. However I make no claim towards being an expert php developer.