Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 190855

Summary: ebuild dependencies with mandatories (or forbidden?) USE flag (example: phpmyadmin and php with USE="-ctype")
Product: Gentoo Linux Reporter: Jey <jehan>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Jey 2007-08-31 09:51:44 UTC
I don't know whether this should be considered simply like a bug, or rather an enhancement in Portage.

Yet it seems that Portage won't act smartly when some dependencies need to be compiled with specific USE flags.

For instance, I tried to install "phpmyadmin-2.10.1". The dependency check made by portage worked (before I type "yes" with the "-a" option in emerge). But when it began to emerge, then it fails saying that php-5.2.4_pre200708051230-r2 needed the "ctype" flag. In my opinion, this should not happen. Portage should be able to detect it before and to propose a rebuild of php with this use flag as a mandatory dependency. Hence there should be a system of USE dependency attached to the package dependcy.
Something like:
DEPEND="dev-lang/php ctype"
to say: it depends on the package php with the ctype flag. And if you have not, portage will propose to rebuild it with this flag automatically, like it would for any package dependency.

Here is the complete build.log:

 [32;01m*[0m 
 [32;01m*[0m Using dev-lang/php-5.2.4_pre200708051230-r2
 [32;01m*[0m 
 [32;01m*[0m Checking for required PHP feature(s) ...
 [32;01m*[0m   Discovered missing USE flag: ctype
 [31;01m*[0m 
 [31;01m*[0m dev-lang/php-5.2.4_pre200708051230-r2 needs to be re-installed with all of the following
 [31;01m*[0m USE flags enabled:
 [31;01m*[0m 
 [31;01m*[0m ctype pcre session unicode
 [31;01m*[0m 
 [31;01m*[0m as well as any of the following USE flags enabled:
 [31;01m*[0m 
 [31;01m*[0m mysql or mysqli if using dev-lang/php-5
 [31;01m*[0m mysql if using dev-lang/php-4
 [31;01m*[0m 

!!! ERROR: dev-db/phpmyadmin-2.10.1 failed.
Call stack:
  ebuild.sh, line 1654:   Called dyn_setup
  ebuild.sh, line 714:   Called qa_call 'pkg_setup'
  ebuild.sh, line 44:   Called pkg_setup
  phpmyadmin-2.10.1.ebuild, line 36:   Called die

!!! Re-install dev-lang/php-5.2.4_pre200708051230-r2
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at '/var/tmp/portage/dev-db/phpmyadmin-2.10.1/temp/build.log'.
__________________________________

Finally I had to re-emerge php alone with the ctype dependency. Then again try to emerge phpmyadmin, and this time it worked.


Reproducible: Always

Steps to Reproduce:
1. Compile dev-lang/php-5.2.4_pre200708051230-r2 with USE="-ctype"
2. Try to emerge dev-db/phpmyadmin-2.10.1
Actual Results:  
It will first aknowledge it is OK (before choosing to proceed or abort)... then will fail shortly after beginning (see build.log in description).

Expected Results:  
3. Now emerge again dev-lang/php-5.2.4_pre200708051230-r2 with USE="ctype"
4. Emerge dev-db/phpmyadmin-2.10.1. It will work.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-08-31 09:55:02 UTC

*** This bug has been marked as a duplicate of bug 2272 ***