Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 310633 - Missing dependencies when installing phpunit-3.4.11
Summary: Missing dependencies when installing phpunit-3.4.11
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-22 00:11 UTC by Matti Bickel (RETIRED)
Modified: 2010-06-09 11:13 UTC (History)
2 users (show)

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 Matti Bickel (RETIRED) gentoo-dev 2010-03-22 00:11:23 UTC
I get this output:
>>> Install phpunit-3.4.11 into /var/tmp/portage/dev-php5/phpunit-3.4.11/image/ category dev-php5
 * 
 * Using dev-lang/php-5.3.2
 * 

Warning: require_once(Console/Getopt.php): failed to open stream: No such file or directory in System.php on line 21
PHP Warning:  require_once(Console/Getopt.php): failed to open stream: No such file or directory in /usr/share/php/System.php on line 21
PHP Fatal error:  require_once(): Failed opening required 'Console/Getopt.php' (include_path='/usr/share/php') in /usr/share/php/System.php on line 21
 * ERROR: dev-php5/phpunit-3.4.11 failed:
 *   Unable to install PEAR package
 * 
 * Call stack:
 *     ebuild.sh, line   54:  Called src_install
 *   environment, line 2989:  Called php-pear-lib-r1_src_install
 *   environment, line 2326:  Called die
 * The specific snippet of code:
 *               pear -d php_bin="${PHP_BIN}" -d www_dir="${WWW_DIR}" install --force --loose --nodeps --offline --packagingroot="${D}" "${S}/package.xml" || die "Unable to install PEAR package";
 * 
 * If you need support, post the output of 'emerge --info =dev-php5/phpunit-3.4.11',
 * the complete build log and the output of 'emerge -pqv =dev-php5/phpunit-3.4.11'.
 * The complete build log is located at '/var/tmp/portage/dev-php5/phpunit-3.4.11/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-php5/phpunit-3.4.11/temp/environment'.
 * S: '/var/tmp/portage/dev-php5/phpunit-3.4.11/work/PHPUnit-3.4.11'

>>> Failed to emerge dev-php5/phpunit-3.4.11, Log file:

This is caused by an incorrect dependency.
Phpunit needs >=dev-php/pear-1.8.1 instead of >=dev-php/PEAR-PEAR-1.8.1 as DEPEND. Correcting the dep fixes the issue.
Comment 1 Doktor Notor 2010-03-22 00:25:16 UTC
Well, already pointed this out wrt php-pear-r1.eclass on Bug 303033; so - php-pear-lib-r1.eclass needs exact same thing like the former in DEPEND. All ebuilds that inherit php-pear-lib-r1 are now broken after the split (reason of which kinda still avades me).

The PEAR-PEAR DEPEND in the ebuild should just go to /dev/null. 
Comment 2 Matti Bickel (RETIRED) gentoo-dev 2010-03-27 14:24:38 UTC
Can you do a little history lesson for me? I know zip about the WHY of these changes.

But here's a little more about the HOW... Here's what i've come up with:

(1) Beandog split the PEAR-PEAR package after version 1.6.2
(2) Packages that have a DEPEND on PEAR-PEAR need either dev-php/pear OR dev-php/PEAR-PEAR-1.6* (either should work?)
(3) Packages requiring PEAR-PEAR can inherit from the php-pear-lib-r1 eclass, which still DEPENDs upon >=dev-php/PEAR-PEAR-1.6.1 (despite beandogs announcement on bug #303033)

So the correct way to solve this would be to replace >=dev-php/PEAR-PEAR-1.6.1 with dev-php/pear in php-pear-lib-r1.eclass' DEPEND?

I'm currently looking for ebuilds which are stable and inherit this eclass, b/c that would make MrBones jumpy as dev-php/pear is still ~arch ;)

In parallel, i will file a stable request for dev-php/pear, which will block all stable requests of stuff using said eclass.

Does this sound sane in the least? I honestly don't have the background in gentoos php to decide if a split PEAR-PEAR is the best option or not. So if anybody could comment on this, it'll be appreciated.
Comment 3 Matti Bickel (RETIRED) gentoo-dev 2010-03-27 14:39:57 UTC
Just to add a note: phpunit has ebuilds that are both stable and use php-pear-lib-r1.

So a plain dev-php/pear DEPEND doesn't suffice until that has a stable version as well.

Maybe i'll do a || (dev-php/pear =dev-php/PEAR-PEAR-1.6*) in the meantime.
Comment 4 Matti Bickel (RETIRED) gentoo-dev 2010-03-27 22:22:09 UTC
Hm, after fiddling for half an hour with the eclass and phpunit I'm not at all sure my solution makes sense.

What *does* work is setting the DEPEND=">=dev-php/pear-1.8.1" in phpunit-3.4
And that's the only way i've come with that will not break the stable tree and still allow me to install unstable stuff.

The PEAR-PEAR DEPEND in php-pear-libs-r1 IMHO is correct, b/c that's the only component used *by the eclass*. So my reasoning was flawed at (3) and packages that need pear to build should say so in their DEPEND.

If somebody can come up with a DEPEND string for php-pear-libs-r1.eclass that will satisfy all pear needs of all ebuilds using the eclass, please comment.
Comment 5 Ole Markus With (RETIRED) gentoo-dev 2010-04-28 19:19:46 UTC
This seems to have become more of an issue after dev-php/pear became stable. If you don't have PEAR-Console_Getopt all installs requiring the pear eclass breaks.
Comment 6 Doktor Notor 2010-04-29 19:10:36 UTC
(In reply to comment #2)
> Can you do a little history lesson for me? I know zip about the WHY of these
> changes.

As already said, php-pear-r1.eclass has what you need here (well, sort of, I can imagine cases where it's broken as well but there's no good way w/ portage as it is). Why the split has been done, I have absolutely no idea and there have been lots of good reason to avoid stuff like that (AFAICT the "split" has already been undone once back in Stuart's days).

So, once again - you *cannot* fix this in ebuild, you need to fix the *eclass* - and this affects everything that uses php-pear-lib-r1.eclass to install.
Comment 7 Ole Markus With (RETIRED) gentoo-dev 2010-05-05 18:31:27 UTC
(In reply to comment #6)
> So, once again - you *cannot* fix this in ebuild, you need to fix the *eclass*
> - and this affects everything that uses php-pear-lib-r1.eclass to install.
> 

I peeked at the eclass, and it looks okay to me. 

DEPEND="dev-lang/php
	|| ( ( >=dev-php/PEAR-PEAR-1.6.1 <dev-php/PEAR-PEAR-1.8.1 )
		 >=dev-php/pear-1.8.1 )"
RDEPEND="${DEPEND}"
Comment 8 Ole Markus With (RETIRED) gentoo-dev 2010-05-05 19:04:34 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > So, once again - you *cannot* fix this in ebuild, you need to fix the *eclass*
> > - and this affects everything that uses php-pear-lib-r1.eclass to install.
> > 
> 
> I peeked at the eclass, and it looks okay to me. 
> 
> DEPEND="dev-lang/php
>         || ( ( >=dev-php/PEAR-PEAR-1.6.1 <dev-php/PEAR-PEAR-1.8.1 )
>                  >=dev-php/pear-1.8.1 )"
> RDEPEND="${DEPEND}"
> 

Never mind that. I just discovered the difference between php-pear-lib and php-pear ...
The former has this as depends
DEPEND="dev-lang/php >=dev-php/PEAR-PEAR-1.6.1"
RDEPEND="${DEPEND}"

It needs to have the same as php-pear
Comment 9 Matti Bickel (RETIRED) gentoo-dev 2010-06-09 11:13:58 UTC
I've just made DEPEND the same in php-pear-1.eclass and php-pear-lib-r1.eclass after a brief discussion with Ole.

@Beandog: if that's not okay, please reopen and propose an alternative solution.

Thanks for the insight guys.