Discussion:
[gentoo-user] problems emerging some ruby packages
(too old to reply)
Arve Barsnes
2022-10-11 20:10:01 UTC
Permalink
Does anybody see what I'm missing?
Maybe you have something in package.use for this package?

You could try to get emerge to tell you more explicitly what problem it has

USE="ruby_targets_ruby31" emerge -av dev-ruby/thor

Regards,
Arve
Jack
2022-10-11 21:30:01 UTC
Permalink
Thanks for the response.
Post by Arve Barsnes
Does anybody see what I'm missing?
Maybe you have something in package.use for this package?
"grep -ir thor ." in /etc/portage has no hits. In addition "grep -ir
ruby ." in /etc/portage shows only package.accept_keyword entries and
RUBY_TARGETS="ruby31" in make.conf.
Post by Arve Barsnes
You could try to get emerge to tell you more explicitly what problem it has
USE="ruby_targets_ruby31" emerge -av dev-ruby/thor
I don't see how this is any different from putting it in package.use,
but it has the same lack of effect.
Post by Arve Barsnes
Regards,
Arve
Can anyone explain (or point me the the fine manual page I missed) the
exact meaning of (-ruby31) in

!!! The ebuild selected to satisfy "dev-ruby/thor" has unmet
requirements.
- dev-ruby/thor-1.2.1::gentoo USE="-doc -test" ABI_X86="(64)"
RUBY_TARGETS="-ruby27 (-ruby30) (-ruby31)"

and why is ruby27 not in parens, but the other two are? Is that just
the assumption that ruby31 is off in any ebuild which does not
explicitly mention it, or does it reflect an explicit turning off of
that flag?

Jack
Neil Bothwick
2022-10-11 23:40:01 UTC
Permalink
For example, "emerge -1 dev-ruby/thor" gives me
!!! Problem resolving dependencies for dev-ruby/thor
... done!
!!! The ebuild selected to satisfy "dev-ruby/thor" has unmet
requirements.
- dev-ruby/thor-1.2.1::gentoo USE="-doc -test" ABI_X86="(64)"
RUBY_TARGETS="-ruby27 (-ruby30) (-ruby31)"
ruby30 and ruby31 are in parentheses, which means they are not available.
any-of ( ruby_targets_ruby27 ruby_targets_ruby30
ruby_targets_ruby31 )
I would expect USE_RUBY="ruby31" to translate into ruby_targets_ruby31,
but even explicitly adding that to package.use has no effect.
The ebuild contains USE_RUBY="ruby26 ruby27" ruby_add_bdepend "

Have you tried setting RUBY_TARGETS to ruby27 for this package?

I must say I find the whole RUBY_* thing even more troublesome than the
PYTHON_* stuff, and that's saying something!
--
Neil Bothwick

Ralph's Observation - It is a mistake to allow any mechanical object
to realize that you are in a hurry.
Michael
2022-10-11 23:50:01 UTC
Permalink
Post by Neil Bothwick
For example, "emerge -1 dev-ruby/thor" gives me
!!! Problem resolving dependencies for dev-ruby/thor
... done!
!!! The ebuild selected to satisfy "dev-ruby/thor" has unmet
requirements.
- dev-ruby/thor-1.2.1::gentoo USE="-doc -test" ABI_X86="(64)"
RUBY_TARGETS="-ruby27 (-ruby30) (-ruby31)"
ruby30 and ruby31 are in parentheses, which means they are not available.
any-of ( ruby_targets_ruby27 ruby_targets_ruby30
ruby_targets_ruby31 )
I would expect USE_RUBY="ruby31" to translate into ruby_targets_ruby31,
but even explicitly adding that to package.use has no effect.
The ebuild contains USE_RUBY="ruby26 ruby27" ruby_add_bdepend "
Have you tried setting RUBY_TARGETS to ruby27 for this package?
I must say I find the whole RUBY_* thing even more troublesome than the
PYTHON_* stuff, and that's saying something!
As per the emerge man page:

- prefix not enabled (either disabled or removed)
[snip...]

() circumfix forced, masked, or removed

On a stable system with default ruby targets, I get this:

[ebuild N ] dev-ruby/thor-1.2.1:1::gentoo USE="-doc -test"
RUBY_TARGETS="ruby27 (-ruby30) (-ruby31)" 95 KiB

and, dev-lang/ruby-2.7.6:2.7 is drawn in as a build dependency:

[ebuild N ] dev-lang/ruby-2.7.6:2.7::gentoo USE="gdbm ipv6 rdoc ssl -
berkdb -debug -doc -examples -jemalloc -jit -rubytests -socks5 -static-libs -
systemtap -tk -xemacs" 11,802 KiB

NOTE: ruby 3.0 and 3.1 are marked as testing.
Jack
2022-10-12 00:20:01 UTC
Permalink
Post by Neil Bothwick
Post by Neil Bothwick
For example, "emerge -1 dev-ruby/thor" gives me
!!! Problem resolving dependencies for dev-ruby/thor
... done!
!!! The ebuild selected to satisfy "dev-ruby/thor" has unmet
requirements.
- dev-ruby/thor-1.2.1::gentoo USE="-doc -test" ABI_X86="(64)"
RUBY_TARGETS="-ruby27 (-ruby30) (-ruby31)"
ruby30 and ruby31 are in parentheses, which means they are not
available.
Post by Neil Bothwick
any-of ( ruby_targets_ruby27 ruby_targets_ruby30
ruby_targets_ruby31 )
I would expect USE_RUBY="ruby31" to translate into
ruby_targets_ruby31,
Post by Neil Bothwick
but even explicitly adding that to package.use has no effect.
The ebuild contains USE_RUBY="ruby26 ruby27" ruby_add_bdepend "
Have you tried setting RUBY_TARGETS to ruby27 for this package?
I must say I find the whole RUBY_* thing even more troublesome than
the
Post by Neil Bothwick
PYTHON_* stuff, and that's saying something!
- prefix not enabled (either disabled or removed)
[snip...]
() circumfix forced, masked, or removed
[ebuild N ] dev-ruby/thor-1.2.1:1::gentoo USE="-doc -test"
RUBY_TARGETS="ruby27 (-ruby30) (-ruby31)" 95 KiB
[ebuild N ] dev-lang/ruby-2.7.6:2.7::gentoo USE="gdbm ipv6 rdoc ssl -
berkdb -debug -doc -examples -jemalloc -jit -rubytests -socks5
-static-libs -
systemtap -tk -xemacs" 11,802 KiB
NOTE: ruby 3.0 and 3.1 are marked as testing.
I explicitly have ruby-3.1 unmasked with "=dev-lang/ruby-3.1.2-r1
~amd64" in package.accept_keyword, and USE_RUBY="ruby31" in make.conf.
I do not see any reference to ruby in the profile. Is there somewhere
else I need to unmask something? emerge --info also says
'RUBY_TARGETS="ruby31"' as its only reference to a specific ruby
version.

As I said in my reply to Neil, why would this happen in just a handful
of packages, but not in over thirty others? mini_mime is the other
problem package, and it does not use ruby_add_bdepend so there is only
one line with USE_RUBY: 'USE_RUBY="ruby26 ruby27 ruby30 ruby31"'.

So - why is ruby31 disabled for (so far) only these two packages?
(The other packages which are failing depend on one of these two.)

Jack
Arve Barsnes
2022-10-12 05:20:01 UTC
Permalink
Post by Jack
As I said in my reply to Neil, why would this happen in just a handful
of packages, but not in over thirty others? mini_mime is the other
problem package, and it does not use ruby_add_bdepend so there is only
one line with USE_RUBY: 'USE_RUBY="ruby26 ruby27 ruby30 ruby31"'.
So - why is ruby31 disabled for (so far) only these two packages?
(The other packages which are failing depend on one of these two.)
Maybe these two are just written more strict? I'm unable to read the
eclass to determine how it masks these flags on a stable system on
these packages, it will happily install it with ruby31 on my unstable
system, but you can try to unmask the flag in
/etc/portage/package.use.mask

dev-ruby/thor -ruby_targets_ruby31

Not the minus sign.

Regards,
Arve
Jack
2022-10-12 19:00:01 UTC
Permalink
Post by Arve Barsnes
Post by Jack
As I said in my reply to Neil, why would this happen in just a
handful of packages, but not in over thirty others? mini_mime is
the other problem package, and it does not use ruby_add_bdepend so
there is only one line with USE_RUBY: 'USE_RUBY="ruby26 ruby27
ruby30 ruby31"'.
So - why is ruby31 disabled for (so far) only these two packages?
(The other packages which are failing depend on one of these two.)
Maybe these two are just written more strict? I'm unable to read the
eclass to determine how it masks these flags on a stable system on
these packages, it will happily install it with ruby31 on my unstable
system, but you can try to unmask the flag in
/etc/portage/package.use.mask
dev-ruby/thor -ruby_targets_ruby31
Well, this almost did the trick. That file has to be in
/etc/portage/profile. Just having it in /etc/portage did not work. It
turns out the masking of ruby_targets_ruby30 and ruby_targets_ruby31 is
in /usr/portage/profiles/base/use.stable.mask. I still have no idea
why ruby31 was masked for these two packages (thor and mini_mime) but
not for over thirty other dev-ruby packages I have installed.

My next issue is that I installed several packages with -O (skip
dependencies) so now I have to work my way through finding all the
uninstalled dependencies I skipped, many of which will need to be
unmasked as they are testing.

Thanks for all the suggestions and support, and I'll report back either
when it's all done or if I find another blockage.

Jack

Michael
2022-10-12 07:50:01 UTC
Permalink
Post by Jack
Post by Michael
NOTE: ruby 3.0 and 3.1 are marked as testing.
I explicitly have ruby-3.1 unmasked with "=dev-lang/ruby-3.1.2-r1
~amd64" in package.accept_keyword, and USE_RUBY="ruby31" in make.conf.
Try setting in your /etc/make.conf this expression instead:

RUBY_TARGETS="ruby31"

as per https://wiki.gentoo.org/wiki/Ruby

and if you have not yet switched to using it, run:

eselect ruby set ruby31
Post by Jack
I do not see any reference to ruby in the profile. Is there somewhere
else I need to unmask something? emerge --info also says
'RUBY_TARGETS="ruby31"' as its only reference to a specific ruby
version.
That's what you'd add in your make.conf, for this ruby slot to be used
globally.
Post by Jack
As I said in my reply to Neil, why would this happen in just a handful
of packages, but not in over thirty others? mini_mime is the other
problem package, and it does not use ruby_add_bdepend so there is only
one line with USE_RUBY: 'USE_RUBY="ruby26 ruby27 ruby30 ruby31"'.
I think it is relevant to how these USE variables are parsed and their syntax.
If you specify the ruby version via a USE flag, then this should be:

USE="ruby31" emerge -pv blah-blah


You need to specify it as above and since you want to use ruby31 wholesale on
your system, set it in make.conf as the wiki page explains.
Jack
2022-10-12 00:00:01 UTC
Permalink
Post by Neil Bothwick
For example, "emerge -1 dev-ruby/thor" gives me
!!! Problem resolving dependencies for dev-ruby/thor ... done!
!!! The ebuild selected to satisfy "dev-ruby/thor" has unmet
requirements.
- dev-ruby/thor-1.2.1::gentoo USE="-doc -test" ABI_X86="(64)"
RUBY_TARGETS="-ruby27 (-ruby30) (-ruby31)"
ruby30 and ruby31 are in parentheses, which means they are not
available.
Given everything below - what other reasons might there be for this?
I've yet to find any pattern of the difference between the ebuilds for
the small number of dev-ruby packages that show this problem, and those
for the the thirty plus which have installed just fine.
Post by Neil Bothwick
any-of ( ruby_targets_ruby27 ruby_targets_ruby30
ruby_targets_ruby31 )
I would expect USE_RUBY="ruby31" to translate into
ruby_targets_ruby31, but even explicitly adding that to package.use
has no effect.
The ebuild contains USE_RUBY="ruby26 ruby27" ruby_add_bdepend "
Hmm. It looks to me that line should probably be 'USE_RUBY="ruby26
ruby27 ruby30 ruby31" ruby_add_bdepend "' However, as it only affects
the required ruby version for two depedencies only if the test use flag
is set (it is not) I'm not sure why it would matter.

I suppose it is likely just a typo in the ebuild. They removed ruby25
from 1.1.0 but didn't add the newer ruby versions. Actually even 1.1.0
may be broken as it includes ruby30 in USE_RUBY but not on the
ruby_add_bdepend line. However, I just made an -r1 in my local
overlay, adding the new ruby versions to that line, and I still get the
same error. So I'm actually still stuck figuring out why this ebuild
won't take ruby31.
Post by Neil Bothwick
Have you tried setting RUBY_TARGETS to ruby27 for this package?
Why would I do that if I don't have ruby-2.7 installed, nor do I want
to?
Post by Neil Bothwick
I must say I find the whole RUBY_* thing even more troublesome than
the PYTHON_* stuff, and that's saying something!
That I agree with. If I knew then what I know now, I would have argued
much more vigorously against using Ruby on Rails for this web site.
But that's fodder another entire thread.
Post by Neil Bothwick
--
Neil Bothwick
Jack
Neil Bothwick
2022-10-12 07:50:01 UTC
Permalink
Post by Jack
Post by Neil Bothwick
Have you tried setting RUBY_TARGETS to ruby27 for this package?
Why would I do that if I don't have ruby-2.7 installed, nor do I want
to?
We don't always get what we want. If thor currently needs 2.7 then you
have to have it if you want thor.

Try it with an emerge -p. Whether it works or not, you will have further
clues as to the source of the issue.
--
Neil Bothwick

Anything worth fighting for is worth fighting dirty for.
Loading...