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

Bug 606712

Summary: dev-ruby/rake[doc] triggers circular dependency with rdoc
Product: Gentoo Linux Reporter: Erik Mackdanz <stasibear>
Component: Current packagesAssignee: Gentoo Ruby Team <ruby>
Status: CONFIRMED ---    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info

Description Erik Mackdanz gentoo-dev 2017-01-21 17:15:21 UTC
Created attachment 460836 [details]
emerge --info

On a clean system (no prior ruby installed), I have specified:
  RUBY_TARGETS="ruby24"

and package.use:
  dev-lang/ruby doc
  dev-ruby/rake doc

'emerge ruby' builds rake before rdoc.  rake fails promptly:

>>> Emerging (11 of 18) dev-ruby/rake-12.0.0::gentoo
 * rake-12.0.0.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...                                              [ ok ]
>>> Unpacking source...
 * Running unpack phase for all ...
>>> Unpacking rake-12.0.0.tar.gz to /var/tmp/portage/dev-ruby/rake-12.0.0/work/all
>>> Source unpacked in /var/tmp/portage/dev-ruby/rake-12.0.0/work
>>> Preparing source in /var/tmp/portage/dev-ruby/rake-12.0.0/work ...
 * Running prepare phase for all ...
 * Running source copy phase for ruby24 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-ruby/rake-12.0.0/work ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-ruby/rake-12.0.0/work ...
 * Running compile phase for all ...
/var/tmp/portage/dev-ruby/rake-12.0.0/temp/environment: line 657: rdoc: command not found

It does not work to oneshot rdoc since it requires rake.

The workaround will be to build without rake[doc] and then build rake again with it.

It looks like this a known problem:
https://bugs.gentoo.org/show_bug.cgi?id=450420
... but still not a good user experience.  

A solution might be:
  rake[doc]
    builds rake without docs
    PDEPEND on rake-docs

  rdoc
    DEPEND on rake

  rake-docs
    DEPEND on rdoc

This requires an extra package, but it would fix the circular dependency and automates the workaround that users must re-discover and manually execute.

If nothing else, a pkg_setup in rake could detect rdoc's absence and alert the user to workaround steps before failing.

Thanks.