Summary: | ruby-ng.eclass forces RUBY_TARGETS to be set in pkg_setup even if ruby is optional | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Sven Vermeulen (RETIRED) <swift> |
Component: | Eclasses | Assignee: | Gentoo Ruby Team <ruby> |
Status: | CONFIRMED --- | ||
Severity: | enhancement | CC: | binki, swift, uzytkownik2 |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 497080 | ||
Attachments: | Sample logic in ruby-ng_pkg_setup to honor RUBY_OPTIONAL |
Description
Sven Vermeulen (RETIRED)
2013-10-27 18:22:48 UTC
Created attachment 362080 [details, diff]
Sample logic in ruby-ng_pkg_setup to honor RUBY_OPTIONAL
(Untested) example approach for in ruby-ng_pkg_setup() to honor the RUBY_OPTIONAL parameter before calling the ruby-specific logic.
This change is necessary to support installing net-irc/epic5 with USE=-ruby. I checked swift’s patch’s logic and tested it, fixes bug #497080 for me. Can you be sure that ruby is always the USE-Flag set when depending on an optional ruby implementation? (In reply to Manuel Rüger from comment #3) > Can you be sure that ruby is always the USE-Flag set when depending on an > optional ruby implementation? So you are suggesting that some flag other than ruby could active the need to DEPEND on ruby. This is consistent with the documentation for ruby_implementations_depend() which specifies that the ebuild may trigger the dependencies with any sort of conditional syntax possible in {R,}DEPEND. Thus, no, it would be possible for other useflags to trigger optional ruby dependence. So perhaps instead the ebuild can be expected to inform ruby-ng.eclass of whether or not an optional ruby is needed at pkg_setup() time. If it really comes down to the ebuild calculating, in pkg_setup(), whether or not ruby-ng_pkg_setup() should be called or not, then it seems that the “hack” of preventing ruby-ng_pkg_setup() from running when the package has ruby disabled is actually the correct way to go about solving this issue. Then, attachment 362080 [details, diff] is unnecessary. But, please update the documentation and examples around ruby_implementations_depend() and RUBY_OPTIONAL to state that RUBY_OPTIONAL=yes ebuilds *must* conditionally call ruby-ng_pkg_setup() in pkg_setup(). Also, as a separate issue I guess, it would be quite nice to update RUBY_OPTIONAL’s documentation. It should state that EAPI>3 ebuilds should include ruby_get_use_targets() in REQUIRED_USE surrounded by the same useflag conditionals as ruby_implementations_depend() is wrapped with in DEPEND. |