[paludis-dev] [Paludis] #1316: Cannot 'cave resolve dev-db/mysql' because of transient blocking circle reference between virtual/mysql and dev-db/mysql

Paludis trac-paludis at exherbo.org
Wed Oct 1 16:30:04 UTC 2014


#1316: Cannot 'cave resolve dev-db/mysql' because of transient blocking circle
reference between virtual/mysql and dev-db/mysql
---------------------------+--------------------------
    Reporter:  christian.  |       Type:  enhancement
      Status:  new         |   Priority:  Sometime
   Milestone:              |  Component:  clients/cave
     Version:  2.0.0       |   Keywords:
  Blocked By:              |   Blocking:
Distribution:  Gentoo      |
---------------------------+--------------------------
 On a system where no dev-db/mysql (or similar) is installed, I want to do

 {{{
 # cave resolve dev-db/mysql
 }}}

 which fails with

 {{{
 !   dev-db/mariadb
     Reasons: !dev-db/mariadb from dev-db/mysql-5.5.39:0::gentoo,
 virtual/mysql-5.5:0::gentoo
     Unsuitable candidates:
       * dev-db/mariadb-5.1.67:0::layman (in ::mysql)
         Masked by unavailable (In a repository which is unavailable)
         Did not meet !dev-db/mariadb, use existing if possible, installing
 to / (nothing is fine too) from !dev-db/mariadb from dev-
 db/mysql-5.5.39:0::gentoo
         Did not meet =dev-db/mariadb-5.5*[embedded=,minimal=,static
 =,static-libs=], use existing if possible, installing to / from
 virtual/mysql-5.5:0::gentoo
 [...]
 }}}

 The problem lies here:

 {{{
 /usr/portage/eclass/mysql-v2.eclass:

 [...]
 # Having different flavours at the same time is not a good idea
 for i in "mysql" "mariadb" "mariadb-galera" "percona-server" "mysql-
 cluster" ; do
         [[ ${i} == ${PN} ]] ||
         DEPEND="${DEPEND} !dev-db/${i}"
 done
 [...]
 PDEPEND="${PDEPEND} ~virtual/mysql-${MYSQL_PV_MAJOR}"
 [...]
 }}}

 and here:

 {{{
 /usr/portage/virtual/mysql-5.5.eclass:

 [...]
 RDEPEND="|| (
         =dev-db/mariadb-${PV}*[embedded=,minimal=,static=,static-libs=]
         =dev-db/mysql-${PV}*[embedded=,minimal=,static=,static-libs=]
         =dev-db/percona-server-${PV}*[embedded=,minimal=,static=,static-
 libs=]
         =dev-db/mariadb-galera-${PV}*[embedded=,minimal=,static=,static-
 libs=]
 )"
 [...]

 }}}

 I have no problem solving this for myself with

 {{{
 cave resolve dev-db/mysql --no-dependencies-from virtual/mysql
 }}}

 but maybe it's worth looking into.

 What is wondering me is the PDEPEND in dev-db/mysql. It gives the resolver
 the chance to put virtual/mysql at the end of the installation process,
 where dev-db/mysql is already installed? And I can remember that I had a
 resolution, where virtual/mysql was actually after dev-db/mysql.

 Of course, if `|| ( cat/pkg1 cat/pkg2 )` only considers installed packages
 and disregards those which are going to be installed, I see the problem. I
 did not find anything in regard to that question in the PMS. But this
 statement at http://archives.gentoo.org/gentoo-
 dev/msg_6977c4c839e3ff3356d159cbe0c173cd.xml
 points in that direction.

 But could not the resolution process for `||` be extended to include
 packages stated on the command line in the first place? I mean like:

 1. `cave resolve dev-db/mysql` (user wants to install dev-db/mysql)
 2. dev-db/mysql depends on virtual/mysql
 3. virtual/mysql depends on `|| ( dev-db/mariadb dev-db/mysql [...] )`
 (none of the packages are installed, so we go with mariadb ... but wait,
 user wanted to install dev-db/mysql, let's go with that instead and make
 him happy)

 More optimal might be, that it determines that dev-db/mysql was previously
 selected to be installed, but I guess that's more complicated to
 implement.

 Some additional information:
 * `cave resolve -c world` has nothing to do and
 * virtual/mysql and dev-db/{mysql,mariadb,percona-server,mariadb-galera}
 are not installed,
 so there are no hidden dependencies as far as I know.

-- 
Ticket URL: <http://paludis.exherbo.org/trac/ticket/1316>
Paludis <http://paludis.exherbo.org/>
Paludis, the Other Package Mangler


More information about the paludis-dev mailing list