Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 645792 - php-ext-pecl-r3.eclass: USE dependencies not used for all PHP targets
Summary: php-ext-pecl-r3.eclass: USE dependencies not used for all PHP targets
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-26 11:41 UTC by Hans F. Nordhaug
Modified: 2018-01-26 14:10 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 Hans F. Nordhaug 2018-01-26 11:41:12 UTC
In /etc/portage/make.conf I have 

PHP_TARGETS="php5-6 php7-1"

(since /usr/portage/profiles/base/make.defaults still uses php7-0).

I discovered the problem when emerging drupal, but I was able to reproduce it with a much simpler (custom) ebuild - excerpt:

----
RDEPEND="
    dev-lang/php[gd]
    dev-php/pecl-uploadprogress
"

REQUIRED_USE="|| ( mysql postgres sqlite )"
----

dev-lang/php-5.6 (which is pulled in because of PHP_TARGETS) is missing both "gd" and "mysql" USE flags when emerging. dev-lang/php-7.1 has the expected USE flags.

The work-around is of course easy - to add the suggested USE changes to /etc/portage/package.use for both PHP targets (or all).

Reproducible: Always
Comment 1 Brian Evans (RETIRED) gentoo-dev 2018-01-26 13:45:12 UTC
The drupal ebuild does not look at the php-ext-pecl-r3 eclass nor does it consider PHP_TARGETS.

Because of this, we cannot fix the eclass.

In addition, the php-ext-pecl-r3 eclass has no mechanism to include USE flags directly into the deps.  Bug 586446 has ideas but none have yet to be implemented.

We cannot just look at RDEPEND or REQUIRED_USE for sure.
Comment 2 Hans F. Nordhaug 2018-01-26 14:05:20 UTC
Thx for responding so quickly. 

I don't object to the CANTFIX, but - taking the drupal ebuild as an example - is there an easy/nice/proper way to fix/work-around the problem using the current version of the php-ext-pecl-r3 eclass?
Comment 3 Brian Evans (RETIRED) gentoo-dev 2018-01-26 14:10:07 UTC
(In reply to Hans F. Nordhaug from comment #2)
> Thx for responding so quickly. 
> 
> I don't object to the CANTFIX, but - taking the drupal ebuild as an example
> - is there an easy/nice/proper way to fix/work-around the problem using the
> current version of the php-ext-pecl-r3 eclass?

Unfortunately, no.  php-ext-pecl-r3 is designed to build C code (specifically from PHP's pecl repository) into a PHP module, not to generate dependencies on PHP script code.  There is no other current eclass that does either.

An ebuild would have to spell out each implementation by hand with a USE requirement.