Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 642400 - dev-ruby/rubygems-2.7.4 will not install for dev-lang/ruby-2.5.0-r1 when ebuild hits ruby25 install
Summary: dev-ruby/rubygems-2.7.4 will not install for dev-lang/ruby-2.5.0-r1 when ebui...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major with 1 vote (vote)
Assignee: Gentoo Ruby Team
Depends on:
Reported: 2017-12-27 13:54 UTC by G.Wolfe Woodbury
Modified: 2018-01-15 03:16 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---

build log (rubygems-2.7.4:20171227-131651.log,136.72 KB, text/plain)
2017-12-27 13:56 UTC, G.Wolfe Woodbury
emerge --info =dev-ruby/rubygems-2.7.4 (einfo-rubygems.txt,16.69 KB, text/plain)
2017-12-27 13:59 UTC, G.Wolfe Woodbury
File listing of dev-lang/ruby-2.5.0-r1 build tree [10449 lines] (ruby25-r1_ls-l.txt.bz2,74.86 KB, application/x-bzip)
2018-01-15 02:56 UTC, G.Wolfe Woodbury
emerge --info =dev-lang/ruby-2.5.0-r1 (einfo.ruby25,17.40 KB, text/plain)
2018-01-15 03:00 UTC, G.Wolfe Woodbury
most recent buildlog for ruby (ruby-2.5.0-r1:20180115-022726.log,365.88 KB, text/x-log)
2018-01-15 03:02 UTC, G.Wolfe Woodbury

Note You need to log in before you can comment on or make changes to this bug.
Description G.Wolfe Woodbury 2017-12-27 13:54:52 UTC
After ruby25 has been merged,, the followup emerge for rubygems update fails when emerge gets to the install phase.  The eclass for ruby does not handle the existence of ruby25, and fails to set the $RUBY variable.

Reproducible: Always

Steps to Reproduce:
1. emerge --update dev-lang/ruby     [to install ruby25]
2. emerge --update dev-ruby/rubygems
Actual Results:  
Install fails with emerge reporting
   $RUBY not set          [see build log attached]

Expected Results:  
normal update

   dev-ruby/rubygems      build log
   dev-ruby/rubygems      info
Comment 1 G.Wolfe Woodbury 2017-12-27 13:56:29 UTC
Created attachment 511736 [details]
build log
Comment 2 G.Wolfe Woodbury 2017-12-27 13:59:06 UTC
Created attachment 511738 [details]
emerge --info =dev-ruby/rubygems-2.7.4
Comment 3 Hans de Graaff gentoo-dev 2017-12-28 06:57:23 UTC
I have never seen this and I have no idea how this would happen. This needs further investigation, probably starting at the eclass.
Comment 4 Hans de Graaff gentoo-dev 2017-12-28 07:03:36 UTC
Ok, so the eclass get the ${RUBY} value from $(type -p ruby25). So either dev-lang/ruby did not provide ruby25 or perhaps this is a hashing issue where the shell PATH is stale?
Comment 5 G.Wolfe Woodbury 2018-01-15 02:56:05 UTC
Created attachment 514846 [details]
File listing of dev-lang/ruby-2.5.0-r1 build tree [10449 lines]

This is a file listing of /var/tmp/portage/dev-lang/ruby-2.5.0-r1 directory from my latest attempt.

Note that all the pieces are built, but there is no image directory, nor does the log file mention any installs in to /usr/bin or anything other than docs
Comment 6 G.Wolfe Woodbury 2018-01-15 03:00:42 UTC
Created attachment 514848 [details]
emerge --info =dev-lang/ruby-2.5.0-r1
Comment 7 G.Wolfe Woodbury 2018-01-15 03:02:22 UTC
Created attachment 514850 [details]
most recent buildlog for ruby
Comment 8 G.Wolfe Woodbury 2018-01-15 03:16:16 UTC
The problem appears to be a little clearer.
The ruby-ng.eclass allows the install of ruby25 to fail silently!

The build log shows that only a tiny bit of doc files for ruby25 are moved from image/ to the system tree; nothing in /usr/bin or elsewhere seem to exist. The einstall step seems to have failed, or its results get clobbered before the portage install phase gets invoked.

Since ruby25 never get put in /usr/bin/ the eclass fails to find it and fails to set the ${RUBY} variable for the subsequent rubygems and other dependency installs.

I have given the latest emerge --info; build log; and a listing of the files from /var/tmp/portage/dev-lang/ruby-2.5.0-r1 tree (used FEATURE=... keepwork ...)

For the moment, I am backing off installing ruby25

might want to update bug title to reflect the error is in the ruby25 install, not the rubygems install.