Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 98956 - PEAR-PEAR-1.3.5-r1 incorrectly assumes that pear is present
Summary: PEAR-PEAR-1.3.5-r1 incorrectly assumes that pear is present
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-13 21:57 UTC by Nikolas 'Atrus' Coukouma
Modified: 2005-07-14 23:00 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikolas 'Atrus' Coukouma 2005-07-13 21:57:07 UTC
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.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-07-14 01:10:15 UTC
(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.
Comment 2 Nikolas 'Atrus' Coukouma 2005-07-14 03:05:52 UTC
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
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2005-07-14 03:19:23 UTC
You forgot to reopen... 
Comment 4 Sebastian Bergmann (RETIRED) gentoo-dev 2005-07-14 23:00:47 UTC
Fixed in CVS.