Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 417675 - Fixing the recursive dependency hell with FEATURES=test
Summary: Fixing the recursive dependency hell with FEATURES=test
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
: 296818 (view as bug list)
Depends on: circular-deps
Blocks:
  Show dependency tree
 
Reported: 2012-05-26 17:51 UTC by Jeroen Roovers
Modified: 2013-07-07 13:50 UTC (History)
4 users (show)

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 Jeroen Roovers gentoo-dev 2012-05-26 17:51:51 UTC
Since a lot of packages set src_test() dependencies through USE=test, having USE=test enabled by default often leads to circular dependencies that emerge cannot resolve.

Since we're supporting this magical linkage between FEATURES=test and USE=test, we might as well take it a step further and disable src_test() automatically when USE=test dependencies cannot be met because of circular dependencies.

 ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~
elmer ~ # emerge -vuaDNt world

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!


[nomerge       ] app-i18n/uim-1.7.3  USE="X anthy canna curl eb emacs gtk gtk3 libedit libffi m17n-lib ncurses nls prime qt4 skk sqlite ssl test unicode xft (-gnome) (-kde) (-libnotify) -static-libs" LINGUAS="-ja -ko -zh_CN -zh_TW"
[nomerge       ]  app-i18n/prime-1.0.0.1
[nomerge       ]   dev-ruby/ruby-progressbar-0.0.9  USE="test" RUBY_TARGETS="ruby18"
[nomerge       ]    virtual/rubygems-1  RUBY_TARGETS="(ruby18)"
[nomerge       ]     dev-ruby/rubygems-1.8.24 [1.8.15] USE="server test" RUBY_TARGETS="ruby18 ruby19%* (-jruby) (-ree18)"
[nomerge       ]      dev-ruby/minitest-2.8.1 [2.6.2] USE="test -doc" RUBY_TARGETS="ruby18 ruby19%* (-jruby) (-ree18)"
[nomerge       ]       dev-ruby/hoe-2.12.5 [2.8.0] USE="test -doc" RUBY_TARGETS="ruby18 ruby19%* (-jruby) (-ree18)"
[ebuild     U ~]        dev-ruby/rubyforge-2.0.4-r2 [2.0.4-r1] USE="test -doc" RUBY_TARGETS="ruby18 ruby19%* (-jruby) (-ree18)" 0 kB
[ebuild     U ~]         dev-ruby/hoe-2.12.5 [2.8.0] USE="test -doc" RUBY_TARGETS="ruby18 ruby19%* (-jruby) (-ree18)" 120 kB
[ebuild     U ~]     dev-ruby/rubygems-1.8.24 [1.8.15] USE="server test" RUBY_TARGETS="ruby18 ruby19%* (-jruby) (-ree18)" 372 kB
[ebuild     U ~]      dev-ruby/minitest-2.8.1 [2.6.2] USE="test -doc" RUBY_TARGETS="ruby18 ruby19%* (-jruby) (-ree18)" 0 kB
[ebuild  NS   ~]      virtual/ruby-rdoc-1 [0] RUBY_TARGETS="(ruby19)" 0 kB
[ebuild     U ~]       dev-ruby/rdoc-3.12 [3.5.1] USE="test -doc" RUBY_TARGETS="ruby18 ruby19%* (-jruby) (-ree18)" 0 kB
[ebuild  N    ~]        dev-ruby/racc-1.4.6-r1  USE="test" RUBY_TARGETS="ruby18 ruby19 (-jruby) (-ree18)" 0 kB
[ebuild     U ~]        dev-ruby/json-1.5.4-r1 [1.5.4] USE="test -doc" RUBY_TARGETS="ruby18 ruby19%* (-jruby) (-ree18)" 0 kB
[ebuild     U ~]         dev-ruby/rake-0.8.7-r6 [0.8.7-r5] USE="bash-completion test -doc" RUBY_TARGETS="ruby18 ruby19%* (-jruby) (-ree18)" 0 kB
[ebuild  NS   ~]          virtual/rubygems-4 [1] RUBY_TARGETS="(ruby19)" 0 kB

Total: 10 packages (7 upgrades, 1 new, 2 in new slots), Size of downloads: 492 kB

 * Error: circular dependencies:

(dev-ruby/hoe-2.12.5::gentoo, ebuild scheduled for merge) depends on
 (dev-ruby/rdoc-3.12::gentoo, ebuild scheduled for merge) (buildtime)
  (dev-ruby/hoe-2.12.5::gentoo, ebuild scheduled for merge) (buildtime)

It might be possible to break this cycle
by applying any of the following changes:
- dev-ruby/rdoc-3.12 (Change USE: -test)
- dev-ruby/hoe-2.12.5 (Change USE: -test)

Note that this change can be reverted, once the package has been installed.

Note that the dependency graph contains a lot of cycles.
Several changes might be required to resolve all cycles.
Temporarily changing some use flag for all packages might be the better option.
 ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~

In the case above, setting FEATUTES=-test USE=-test means rebuilding a lot of the installed packages. Instead, since USE=test is special already (it should only affect what happens in src_test(), right?) we might as well disable the test phase, tell the user in einfo, and be done with it. We could even write that to vdb so that on the next run, the package is re-emerged but with src_test() getting run properly this time.
Comment 1 Zac Medico gentoo-dev 2012-05-26 20:59:45 UTC
(In reply to comment #0)
> In the case above, setting FEATUTES=-test USE=-test means rebuilding a lot
> of the installed packages.

In bug 373209 comment #3 we have a plan to make --newuse independent of USE=test state.
Comment 2 Zac Medico gentoo-dev 2012-05-26 21:11:07 UTC
*** Bug 296818 has been marked as a duplicate of this bug. ***
Comment 3 Rick Farina (Zero_Chaos) gentoo-dev 2013-05-02 06:42:51 UTC
This issue got a little bit of discussion on the ML lately and imho is a rather big issue which is preventing some devs (me at least) from running useful tests widely across the tree.