[paludis-dev] [Paludis] #1319: paludis-2.2.0 fails to properly resolve some deps on virtual/rubygems

Paludis trac-paludis at exherbo.org
Fri Jan 9 09:32:30 UTC 2015


#1319: paludis-2.2.0 fails to properly resolve some deps on virtual/rubygems
-------------------------+-------------------------------------------------
    Reporter:  cmuelle8  |       Type:  defect
      Status:  new       |   Priority:  MinorRelease
   Milestone:            |  Component:  core/paludis/resolver
     Version:  2.2.0     |   Keywords:  rubygems virtual depends
  Blocked By:            |  ruby_targets
Distribution:  N/A       |   Blocking:
-------------------------+-------------------------------------------------
 IMHO there is an error the way paludis handles depends to virtual/rubygems
 - or say an incosistency with the way portage handles these depends.

 The problem surfaces if multiple versions of ruby and hence rubygems are
 installed. [PREREQ section]

 Depends on '''virtual/rubygems''' are not slot'ed by stock '''ruby-
 ng.eclass'''.  The eclass employs use flag depends _only_ to ensure proper
 versions of rubygems are installed, i.e.
   '''virtual/rubygems[ruby_targets_rubyXX]'''. [STOCK_RES section]

 I conclude the problem stems from a behavior of paludis to assume that
 _one_ particular version of virtual/rubygems has to satisfy _all_ use flag
 constraints in effect.  The reason for this conclusion is:  If I add
 slot'ing to the depend string [ECLASSFIX section], the problem disappears,
 i.e.
   '''virtual/rubygems:rubyXX[ruby_targets_rubyXX]'''. [FIXED_RES section]

 Note that the ECLASSFIX given below is just for demonstration purpose of
 the problem, imho paludis resolver should be fixed, _unless_ portage also
 exhibits this problem.

 Greetings
 cmuelle8

 == PREREQ ==
 i at w /var/paludis/repositories/gentoo/eclass $ sudo '''cave -Ls show -f
 virtual/rubygems::installed'''
 {{{
 * virtual/rubygems::installed
     ::installed               4 {:ruby19} 6 {:ruby20}
     virtual/rubygems-4:ruby19::installed
     Description               Virtual ebuild for rubygems
     Homepage
     From repositories         gentoo
     Installed time            Thu Jan 01 09:24:51 CET 2015
     Installed using           paludis-2.2.0
     License
     Use flags                 ruby_targets: (ruby19) build_options: -trace
     virtual/rubygems-6:ruby20::installed
     Description               Virtual ebuild for rubygems
     Homepage
     From repositories         gentoo
     Installed time            Thu Jan 01 09:25:06 CET 2015
     Installed using           paludis-2.2.0
     License
     Use flags                 ruby_targets: (ruby20) build_options: -trace
 }}}

 == STOCK_RES ==
 i at w /var/paludis/repositories/gentoo/eclass $ sudo '''cave -Ls show -c
 syntax'''
 {{{
 * dev-ruby/syntax::gentoo
     ::gentoo                  1.0.0-r4 1.2.0-r1(~)* {:0}
     dev-ruby/syntax-1.2.0-r1:0::gentoo
     Description               Syntax highlighting for sourcecode and HTML
     Homepage                  https://github.com/dblock/syntax
     Herds                     ruby
     Use flags
         USE
             doc               Add extra documentation (API, Javadoc, etc).
 It is recommended to enable per package instead of globally
             (-test)           Workaround to pull in packages needed to run
 with FEATURES=test. Portage-2.1.2 handles this internally, so don't set it
 in make.conf/package.use anymore
         ruby_targets
             ruby19            Build with MRI Ruby 1.9.x
             ruby20            Build with MRI Ruby 2.0.x
             -ruby21           Build with MRI Ruby 2.1.x
             -ruby22           Build with MRI Ruby 2.2.x
         Build Options
             symbols=strip     How to handle debug symbols in installed
 files
                               Permitted values:
                                   compress:  Split and compress debug
 symbols
                                   preserve:  Preserve debug symbols
                                   split:     Split debug symbols
                                   strip:     Strip debug symbols
             dwarf_compress    Compress DWARF2+ debug information
             -optional_tests   Run tests considered by the package to be
 optional
             -trace            Trace actions executed by the package (very
 noisy, for debugging broken builds only)
             work=remove       Whether to preserve or remove working
 directories
                               Permitted values:
                                   leave:     Do not remove, but allow
 destructive merges
                                   preserve:  Preserve the working
 directory
                                   remove:    Always remove the working
 directory
                                   tidyup:    Tidy up work directory after
 a successful build
     Build dependencies
                               ruby_targets_ruby19? (
                                   doc? (
                                       dev-ruby/rdoc[ruby_targets_ruby19]
                                   )
                               )
                               ruby_targets_ruby20? (
                                   doc? (
                                       dev-ruby/rdoc[ruby_targets_ruby20]
                                   )
                               )
                               ruby_targets_ruby21? (
                                   doc? (
                                       dev-ruby/rdoc[ruby_targets_ruby21]
                                   )
                               )
                               ruby_targets_ruby22? (
                                   doc? (
                                       dev-ruby/rdoc[ruby_targets_ruby22]
                                   )
                               )
                               ruby_targets_ruby19? (
                                   dev-lang/ruby:1.9
                               )
                               ruby_targets_ruby20? (
                                   dev-lang/ruby:2.0
                               )
                               ruby_targets_ruby21? (
                                   dev-lang/ruby:2.1
                               )
                               ruby_targets_ruby22? (
                                   dev-lang/ruby:2.2
                               )
                               ruby_targets_ruby19? (
                                   doc? (
                                       dev-ruby/rake[ruby_targets_ruby19]
                                   )
                               )
                               ruby_targets_ruby20? (
                                   doc? (
                                       dev-ruby/rake[ruby_targets_ruby20]
                                   )
                               )
                               ruby_targets_ruby21? (
                                   doc? (
                                       dev-ruby/rake[ruby_targets_ruby21]
                                   )
                               )
                               ruby_targets_ruby22? (
                                   doc? (
                                       dev-ruby/rake[ruby_targets_ruby22]
                                   )
                               )
                               ruby_targets_ruby19? (
                                   test? (
                                       dev-ruby/rake[ruby_targets_ruby19]
                                   )
                               )
                               ruby_targets_ruby20? (
                                   test? (
                                       dev-ruby/rake[ruby_targets_ruby20]
                                   )
                               )
                               ruby_targets_ruby21? (
                                   test? (
                                       dev-ruby/rake[ruby_targets_ruby21]
                                   )
                               )
                               ruby_targets_ruby22? (
                                   test? (
                                       dev-ruby/rake[ruby_targets_ruby22]
                                   )
                               )
                               ruby_targets_ruby19? (
                                   virtual/rubygems[ruby_targets_ruby19]
                               )
                               ruby_targets_ruby20? (
                                   virtual/rubygems[ruby_targets_ruby20]
                               )
                               ruby_targets_ruby21? (
                                   virtual/rubygems[ruby_targets_ruby21]
                               )
                               ruby_targets_ruby22? (
                                   virtual/rubygems[ruby_targets_ruby22]
                               )
                               test? (
                                   ruby_targets_ruby19? (
 virtual/rubygems[ruby_targets_ruby19]
                                   )
                                   ruby_targets_ruby20? (
 virtual/rubygems[ruby_targets_ruby20]
                                   )
                                   ruby_targets_ruby21? (
 virtual/rubygems[ruby_targets_ruby21]
                                   )
                                   ruby_targets_ruby22? (
 virtual/rubygems[ruby_targets_ruby22]
                                   )
                               )
     Run dependencies
                               ruby_targets_ruby19? (
                                   dev-lang/ruby:1.9
                               )
                               ruby_targets_ruby20? (
                                   dev-lang/ruby:2.0
                               )
                               ruby_targets_ruby21? (
                                   dev-lang/ruby:2.1
                               )
                               ruby_targets_ruby22? (
                                   dev-lang/ruby:2.2
                               )
                               ruby_targets_ruby19? (
                                   virtual/rubygems[ruby_targets_ruby19]
                               )
                               ruby_targets_ruby20? (
                                   virtual/rubygems[ruby_targets_ruby20]
                               )
                               ruby_targets_ruby21? (
                                   virtual/rubygems[ruby_targets_ruby21]
                               )
                               ruby_targets_ruby22? (
                                   virtual/rubygems[ruby_targets_ruby22]
                               )
     Source URI
 https://github.com/dblock/syntax/archive/v1.2.0.tar.gz ->
 syntax-1.2.0.tar.gz
         Overridden Masks
             Keywords          ~alpha ~amd64 ~amd64-linux ~arm ~hppa ~ia64
 ~mips ~ppc ~ppc-macos ~ppc64 ~sparc ~sparc-solaris ~sparc64-solaris
 ~x64-macos ~x64-solaris ~x86 ~x86-fbsd ~x86-linux ~x86-macos ~x86-solaris
 }}}
 i at w /var/paludis/repositories/gentoo/eclass $ sudo '''cave -Ls resolve -1
 --lazy syntax'''
 {{{
 These are the actions I will take, in order:

 r   dev-ruby/syntax:0::gentoo 1.2.0-r1 to ::installed replacing 1.2.0-r1
     doc (-test) RUBY_TARGETS: ruby19 ruby20 -ruby21 -ruby22 build_options:
 symbols=strip dwarf_compress -optional_tests -trace work=remove
     Reasons: target

 Total: 1 reinstalls

 I encountered the following errors:

 !   virtual/rubygems
     Reasons: dev-ruby/syntax-1.2.0-r1:0::gentoo
     Unsuitable candidates:
       * virtual/rubygems-6:ruby20::gentoo
         Did not meet virtual/rubygems[ruby_targets_ruby19], use existing
 if possible, installing to / from dev-ruby/syntax-1.2.0-r1:0::gentoo
             Flag 'ruby_targets_ruby19' enabled
 }}}

 == ECLASSFIX ==
 i at w /var/paludis/repositories/gentoo/eclass $ sudo '''vim ruby-
 ng.eclass'''

 i at w /var/paludis/repositories/gentoo/eclass $ '''diff -ur ruby-
 ng.eclass{~,}'''
 {{{
 --- ruby-ng.eclass~     2015-01-09 09:36:47.000000000 +0100
 +++ ruby-ng.eclass      2015-01-09 09:38:17.000000000 +0100
 @@ -198,7 +198,8 @@
         local atoms=$(_ruby_atoms_samelib_generic "$*")

         for _ruby_implementation in $USE_RUBY; do
 -               echo
 "${atoms//RUBYTARGET/ruby_targets_${_ruby_implementation}}"
 +               local
 a="${atoms//virtual\/rubygems/virtual/rubygems:${_ruby_implementation}}"
 +               echo
 "${a//RUBYTARGET/ruby_targets_${_ruby_implementation}}"
         done
  }

 }}}

 == FIXED_RES ==
 i at w /var/paludis/repositories/gentoo/eclass $ sudo '''cave -Ls show -c
 syntax'''
 {{{
 * dev-ruby/syntax
     ::gentoo                  1.0.0-r4 1.2.0-r1(~)* {:0}
     dev-ruby/syntax-1.2.0-r1:0::gentoo
     Description               Syntax highlighting for sourcecode and HTML
     Homepage                  https://github.com/dblock/syntax
     Herds                     ruby
     Use flags
         USE
             doc               Add extra documentation (API, Javadoc, etc).
 It is recommended to enable per package instead of globally
             (-test)           Workaround to pull in packages needed to run
 with FEATURES=test. Portage-2.1.2 handles this internally, so don't set it
 in make.conf/package.use anymore
         ruby_targets
             ruby19            Build with MRI Ruby 1.9.x
             ruby20            Build with MRI Ruby 2.0.x
             -ruby21           Build with MRI Ruby 2.1.x
             -ruby22           Build with MRI Ruby 2.2.x
         Build Options
             symbols=strip     How to handle debug symbols in installed
 files
                               Permitted values:
                                   compress:  Split and compress debug
 symbols
                                   preserve:  Preserve debug symbols
                                   split:     Split debug symbols
                                   strip:     Strip debug symbols
             dwarf_compress    Compress DWARF2+ debug information
             -optional_tests   Run tests considered by the package to be
 optional
             -trace            Trace actions executed by the package (very
 noisy, for debugging broken builds only)
             work=remove       Whether to preserve or remove working
 directories
                               Permitted values:
                                   leave:     Do not remove, but allow
 destructive merges
                                   preserve:  Preserve the working
 directory
                                   remove:    Always remove the working
 directory
                                   tidyup:    Tidy up work directory after
 a successful build
     Build dependencies
                               ruby_targets_ruby19? (
                                   doc? (
                                       dev-ruby/rdoc[ruby_targets_ruby19]
                                   )
                               )
                               ruby_targets_ruby20? (
                                   doc? (
                                       dev-ruby/rdoc[ruby_targets_ruby20]
                                   )
                               )
                               ruby_targets_ruby21? (
                                   doc? (
                                       dev-ruby/rdoc[ruby_targets_ruby21]
                                   )
                               )
                               ruby_targets_ruby22? (
                                   doc? (
                                       dev-ruby/rdoc[ruby_targets_ruby22]
                                   )
                               )
                               ruby_targets_ruby19? (
                                   dev-lang/ruby:1.9
                               )
                               ruby_targets_ruby20? (
                                   dev-lang/ruby:2.0
                               )
                               ruby_targets_ruby21? (
                                   dev-lang/ruby:2.1
                               )
                               ruby_targets_ruby22? (
                                   dev-lang/ruby:2.2
                               )
                               ruby_targets_ruby19? (
                                   doc? (
                                       dev-ruby/rake[ruby_targets_ruby19]
                                   )
                               )
                               ruby_targets_ruby20? (
                                   doc? (
                                       dev-ruby/rake[ruby_targets_ruby20]
                                   )
                               )
                               ruby_targets_ruby21? (
                                   doc? (
                                       dev-ruby/rake[ruby_targets_ruby21]
                                   )
                               )
                               ruby_targets_ruby22? (
                                   doc? (
                                       dev-ruby/rake[ruby_targets_ruby22]
                                   )
                               )
                               ruby_targets_ruby19? (
                                   test? (
                                       dev-ruby/rake[ruby_targets_ruby19]
                                   )
                               )
                               ruby_targets_ruby20? (
                                   test? (
                                       dev-ruby/rake[ruby_targets_ruby20]
                                   )
                               )
                               ruby_targets_ruby21? (
                                   test? (
                                       dev-ruby/rake[ruby_targets_ruby21]
                                   )
                               )
                               ruby_targets_ruby22? (
                                   test? (
                                       dev-ruby/rake[ruby_targets_ruby22]
                                   )
                               )
                               ruby_targets_ruby19? (
 virtual/rubygems:ruby19[ruby_targets_ruby19]
                               )
                               ruby_targets_ruby20? (
 virtual/rubygems:ruby20[ruby_targets_ruby20]
                               )
                               ruby_targets_ruby21? (
 virtual/rubygems:ruby21[ruby_targets_ruby21]
                               )
                               ruby_targets_ruby22? (
 virtual/rubygems:ruby22[ruby_targets_ruby22]
                               )
                               test? (
                                   ruby_targets_ruby19? (
 virtual/rubygems:ruby19[ruby_targets_ruby19]
                                   )
                                   ruby_targets_ruby20? (
 virtual/rubygems:ruby20[ruby_targets_ruby20]
                                   )
                                   ruby_targets_ruby21? (
 virtual/rubygems:ruby21[ruby_targets_ruby21]
                                   )
                                   ruby_targets_ruby22? (
 virtual/rubygems:ruby22[ruby_targets_ruby22]
                                   )
                               )
     Run dependencies
                               ruby_targets_ruby19? (
                                   dev-lang/ruby:1.9
                               )
                               ruby_targets_ruby20? (
                                   dev-lang/ruby:2.0
                               )
                               ruby_targets_ruby21? (
                                   dev-lang/ruby:2.1
                               )
                               ruby_targets_ruby22? (
                                   dev-lang/ruby:2.2
                               )
                               ruby_targets_ruby19? (
 virtual/rubygems:ruby19[ruby_targets_ruby19]
                               )
                               ruby_targets_ruby20? (
 virtual/rubygems:ruby20[ruby_targets_ruby20]
                               )
                               ruby_targets_ruby21? (
 virtual/rubygems:ruby21[ruby_targets_ruby21]
                               )
                               ruby_targets_ruby22? (
 virtual/rubygems:ruby22[ruby_targets_ruby22]
                               )
     Source URI
 https://github.com/dblock/syntax/archive/v1.2.0.tar.gz ->
 syntax-1.2.0.tar.gz
         Overridden Masks
             Keywords          ~alpha ~amd64 ~amd64-linux ~arm ~hppa ~ia64
 ~mips ~ppc ~ppc-macos ~ppc64 ~sparc ~sparc-solaris ~sparc64-solaris
 ~x64-macos ~x64-solaris ~x86 ~x86-fbsd ~x86-linux ~x86-macos ~x86-solaris
 }}}
 i at w /var/paludis/repositories/gentoo/eclass $ sudo '''cave -Ls resolve -1
 --lazy syntax'''
 {{{
 These are the actions I will take, in order:

 r   dev-ruby/syntax:0::gentoo 1.2.0-r1 to ::installed replacing 1.2.0-r1
     doc (-test) RUBY_TARGETS: ruby19 ruby20 -ruby21 -ruby22 build_options:
 symbols=strip dwarf_compress -optional_tests -trace work=remove
     Reasons: target

 Total: 1 reinstalls

 Executing pretend actions: 1 of 1

  * You have 23 unread news items (use 'eselect news' to read)
 }}}

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


More information about the paludis-dev mailing list