After upgrading PHP, I discovered pear was no longer installed. So, I learned that I needed to emerge 1.3.5-r1 to get it back. Minor problem: -r1 assumes PEAR is present if it has a version number: if has_version "dev-php/PEAR-PEAR"; then install_pear_without_bootstrap else bootstrap_pear install_pear_after_bootstrap fi This looks decent, but upgrading PHP causes /usr/bin/pear to be removed (multiple packages owning the same file is ugly), so the when -r1 tries to install_pear_without_bootstrap, it fails miserably. I think the safest check is simply whether or not the pear script exists: if (-x /usr/bin/pear); then install_pear_without_bootstrap else bootstrap_pear install_pear_after_bootstrap fi Reproducible: Always Steps to Reproduce: 1. 2. 3.
(In reply to comment #0) > This looks decent, but upgrading PHP causes /usr/bin/pear to be removed > (multiple packages owning the same file is ugly), so the when -r1 tries to > install_pear_without_bootstrap, it fails miserably. Please, post the error messages you get you get when _not_ boostrapping.
Steps to reproduce: 1. emerge =dev-php/php-5.0.3-r1 2. emerge ">dev-php/php-5.0.3-r1" 3. emerge =dev-php/PEAR-PEAR-1.3.5-r1 >>> Unpacking source... >>> Unpacking Archive_Tar-1.2.tgz to /var/tmp/portage/PEAR-PEAR-1.3.5-r1/work tar: A lone zero block at 163 >>> Unpacking Console_Getopt-1.2.tgz to /var/tmp/portage/PEAR-PEAR-1.3.5-r1/work tar: A lone zero block at 27 >>> Unpacking XML_RPC-1.3.1.tgz to /var/tmp/portage/PEAR-PEAR-1.3.5-r1/work tar: A lone zero block at 236 >>> Unpacking PEAR-1.3.5.tgz to /var/tmp/portage/PEAR-PEAR-1.3.5-r1/work tar: A lone zero block at 1088 >>> Source unpacked. >>> Test phase [not enabled]: dev-php/PEAR-PEAR-1.3.5-r1 >>> Install PEAR-PEAR-1.3.5-r1 into /var/tmp/portage/PEAR-PEAR-1.3.5-r1/image/ category dev-php /usr/portage/dev-php/PEAR-PEAR/PEAR-PEAR-1.3.5-r1.ebuild: line 101: pear: command not found !!! ERROR: dev-php/PEAR-PEAR-1.3.5-r1 failed.!!! Function install_pear_without_bootstrap, Line 101, Exitcode 127 Tested fix: - if has_version "dev-php/PEAR-PEAR"; then + if -x /usr/bin/pear; then
You forgot to reopen...
Fixed in CVS.