Use =dev-lang/php-5.5.2 as an example. I have installed that package with the 'mysql' and 'pdo' use flags enabled. I have not enabled the 'libmysqlclient' use flag. The DEPENDS/RDEPENDS variables read like this: libmysqlclient? ( mysql? ( virtual/mysql ) mysqli? ( >=virtual/mysql-4.1 ) ) According to that, PHP does not depend on virtual/mysql since libmysqlclient is not enabled. I confirm this with 'ldd /usr/bin/php5.5' and 'grep mysql /var/db/pkg/dev-lang/php-5.5.2/DEPEND' and 'grep mysql /var/db/pkg/dev-lang/php-5.5.2/RDEPEND'. However, 'equery g =dev-lang/php-5.5.2' shows that it does depend on 'virtual/mysql': ---------------------- * Searching for php5.5.2 in dev-lang ... * dependency graph for dev-lang/php-5.5.2 `-- dev-lang/php-5.5.2 amd64 ... `-- virtual/mysql-5.1 (virtual/mysql) amd64 ... [ dev-lang/php-5.5.2 stats: packages (55), max depth (1) ] ---------------------- 'equery d virtual/mysql' also shows the incorrect dependency: ---------------------- * These packages depend on virtual/mysql: ... dev-lang/php-5.5.2 (mysql ? virtual/mysql) (mysqli ? >=virtual/mysql-4.1) ... ---------------------- Reproducible: Always Steps to Reproduce: 1. Emerge PHP 5.5.2 with mysql and pdo flags enabled. Leave libmysqlclient disabled. 2. equery g =dev-lang/php-5.5.2 or equery d virtual/mysql Actual Results: equery g and equery d show that php depends on virtual/mysql. Expected Results: equery g and equery d should show that php DOES NOT depend on virtual/mysql. I discovered this problem when emerge --depclean -p showed that everything mysql related was going to be removed. In the past, dev-lang/php:5.3 used to depend on virtual/mysql and everything mysql related was not going to be removed. I believe the dependency on virtual/mysql was removed in this change to the portage tree: ------------------------------ *php-5.5.0_beta2-r1 (29 Mar 2013) 29 Mar 2013; Ole Markus With <olemarkus@gentoo.org> +php-5.5.0_beta2-r1.ebuild, metadata.xml: Flip libmysqlclient and mysqlnd so that mysqlnd is enabed by default ------------------------------
FYI... I worked around overall issue by adding virtual/mysql to world file so the mysql related ebuilds are not installed. For this bug... I would like to see equery g and equery d show the correct dependency information... something like: (libmysqlclient && mysql) ? virtual/mysql