Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 139348
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Ruby Team <ruby@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Emiliano Vavassori <syntaxerrormmm@gmail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 139348 depends on: Show dependency tree
Bug 139348 blocks: 139322
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-07-05 11:19 0000
Hello,

Inheriting ruby.eclass for using its functions may not unconditionally add a
dependence on ruby (virtual/ruby).
We've at least one problem (bug 139322) regarding the unconditional dependence
on ruby when ruby.eclass is inherited. For more information, please see the bug
report mentioned above.
An idea (as reported by Jakub Moc) is to add:

if [[ ${RUBY_OPTIONAL} != "yes" ]] ; then
        DEPEND="${DEPEND} virtual/ruby"
else
        DEPEND="${DEPEND} ruby? ( virtual/ruby )"
fi

to ruby.eclass.

Thank you all.

------- Comment #1 From Nick Devito 2006-07-05 11:21:25 0000 -------
We could also do something similar as to the python eclass: 

if [[ -n "${NEED_PYTHON}" ]] ; then
        DEPEND=">=dev-lang/python-${NEED_PYTHON}"
        RDEPEND="${DEPEND}"
fi

------- Comment #2 From Jakub Moc (RETIRED) 2006-07-05 11:45:09 0000 -------
Oh well... though, not sure if a separate bug was needed for this, pretty much
covered by Bug 139322.

------- Comment #3 From Diego E. 'Flameeyes' Pettenò 2006-07-06 20:07:46 0000 -------
Asking an idea to portage devs.

Would this make sense, or you think that adding a ruby-functions eclass would
be cleaner?

------- Comment #4 From Zac Medico 2006-07-06 20:22:24 0000 -------
You wouldn't really want to have too many conditionals like that, but if it's
just one then it's not so bad.  It just allows ebuilds that don't necessarily
need ruby to turn that off, while all the other ebuilds that need it get it
implicitely.

------- Comment #5 From Diego E. 'Flameeyes' Pettenò 2006-07-06 21:04:53 0000 -------
What I'm wondering is the long term result in overhead during metadata
generation. What would be the difference respect a ruby-functions eclass
(inherited by ruby)? slower/faster?

------- Comment #6 From Zac Medico 2006-07-06 21:41:02 0000 -------
metadata generation performance really shouldn't be a consideration in these
types of decisions.  The current method used to generate metadata is quite
inefficient and will certainly be improved (pkgcore is highly optimized for
this).  When you inherit ruby.eclass, you also incur the overhead of sourcing
eutils and toolchain-funcs, but you shouldn't worry too much about that
(hopefully you're not generating metadata on a 386).

The decision the you make should be more about coding style.  The simplest
solution is often (but not always) the best. :)

------- Comment #7 From Marius Mauch (RETIRED) 2006-07-07 06:54:21 0000 -------
this shouldn't make a significant difference anyway (less than 1%).

------- Comment #8 From Diego E. 'Flameeyes' Pettenò 2006-07-07 07:09:29 0000 -------
Done, now RUBY_OPTIONAL="yes" disable the dependency on virtual/ruby.

WARNING WARNING WARNING WARNING WARNING WARNING

As we can't predict the behaviour of all ebuilds when ruby is optional, as in
which flag and when and so on, IUSE and DEPEND _have_ to be set by the ebuild
itself.

------- Comment #9 From Emiliano Vavassori 2006-07-07 07:15:03 0000 -------
Thank you all.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug