Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 671064 - ruby_targets_ruby24 is enabled in stable amd64 profile
Summary: ruby_targets_ruby24 is enabled in stable amd64 profile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Profiles (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Ruby Team
URL: https://forums.gentoo.org/viewtopic-p...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-13 10:22 UTC by Marco Genasci
Modified: 2018-11-28 23:08 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Genasci 2018-11-13 10:22:00 UTC
For some reason ruby_targets_ruby24 is enabled in a stable amd64 profile by /usr/portage/profiles/arch/amd64/make.defaults that overwrite /usr/portage/profiles/arch/amd64/make.defaults

Reproducible: Always
Comment 1 Marco Genasci 2018-11-13 10:26:37 UTC
As workaround you can override RUBY_TARGETS="ruby23" in /etc/portage/make.conf
Comment 2 Tomáš Mózes 2018-11-13 11:38:51 UTC
This was probably introduced via https://github.com/gentoo/gentoo/commit/bc014d3fefbfb979addf255df20d60e530658634 as preparation for Ruby 2.4 stabilization.
Comment 3 Tomáš Mózes 2018-11-13 11:45:59 UTC
On a stable amd64 system:

# emerge --info | grep RUBY_TARGETS
RUBY_TARGETS="ruby23 ruby24"
Comment 4 Hans de Graaff gentoo-dev Security 2018-11-13 16:53:55 UTC
(In reply to Marco Genasci from comment #0)
> For some reason ruby_targets_ruby24 is enabled in a stable amd64 profile by
> /usr/portage/profiles/arch/amd64/make.defaults that overwrite
> /usr/portage/profiles/arch/amd64/make.defaults

These two paths are the same, you probably don't intend this?

profiles/arch/amd64/make.defaults has RUBY_TARGETS=ruby23 and this should overwrite base/make.defaults which already has RUBY_TARGETS="ruby23 ruby24" in preparation of marking ruby24 stable.
Comment 5 Hans de Graaff gentoo-dev Security 2018-11-13 16:58:18 UTC
(In reply to Hans de Graaff from comment #4)

> profiles/arch/amd64/make.defaults has RUBY_TARGETS=ruby23 and this should
> overwrite base/make.defaults which already has RUBY_TARGETS="ruby23 ruby24"
> in preparation of marking ruby24 stable.

But it doesn't seem to do that. I'll investigate more later this evening.
Comment 6 Marco Genasci 2018-11-13 17:11:01 UTC
(In reply to Hans de Graaff from comment #4)
> (In reply to Marco Genasci from comment #0)
> > For some reason ruby_targets_ruby24 is enabled in a stable amd64 profile by
> > /usr/portage/profiles/arch/amd64/make.defaults that overwrite
> > /usr/portage/profiles/arch/amd64/make.defaults
> 
> These two paths are the same, you probably don't intend this?
> 
> profiles/arch/amd64/make.defaults has RUBY_TARGETS=ruby23 and this should
> overwrite base/make.defaults which already has RUBY_TARGETS="ruby23 ruby24"
> in preparation of marking ruby24 stable.

Yes sorry bad copy&paste, I intend /usr/portage/profiles/base/make.default
Comment 7 Marco Genasci 2018-11-13 18:03:33 UTC
(In reply to Hans de Graaff from comment #5)
> (In reply to Hans de Graaff from comment #4)
> 
> > profiles/arch/amd64/make.defaults has RUBY_TARGETS=ruby23 and this should
> > overwrite base/make.defaults which already has RUBY_TARGETS="ruby23 ruby24"
> > in preparation of marking ruby24 stable.
> 
> But it doesn't seem to do that. I'll investigate more later this evening.

Ok the variables in the files are not overwrite but merged if I change in amd64/make.defaults from RUBY_TARGETS="ruby23" to RUBY_TARGETS="ruby23 -ruby24" works
Comment 8 Larry the Git Cow gentoo-dev 2018-11-13 18:50:35 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61f269a66ca07af54396e6e296949f53110eaac8

commit 61f269a66ca07af54396e6e296949f53110eaac8
Author:     Hans de Graaff <graaff@gentoo.org>
AuthorDate: 2018-11-13 18:49:14 +0000
Commit:     Hans de Graaff <graaff@gentoo.org>
CommitDate: 2018-11-13 18:49:14 +0000

    profiles/arch/*/make.defaults: properly overwrite ruby24
    
    The RUBY_TARGETS setting is cumulative so we need to actively turn off
    ruby24 to overwrite the setting in base/make.defaults.
    
    Fixes: https://bugs.gentoo.org/671064
    
    Signed-off-by: Hans de Graaff <graaff@gentoo.org>

 profiles/arch/alpha/make.defaults         | 2 +-
 profiles/arch/amd64/make.defaults         | 2 +-
 profiles/arch/arm/make.defaults           | 2 +-
 profiles/arch/hppa/make.defaults          | 2 +-
 profiles/arch/ia64/make.defaults          | 2 +-
 profiles/arch/powerpc/ppc32/make.defaults | 2 +-
 profiles/arch/powerpc/ppc64/make.defaults | 2 +-
 profiles/arch/s390/make.defaults          | 2 +-
 profiles/arch/sparc/make.defaults         | 2 +-
 profiles/arch/x86/make.defaults           | 2 +-
 10 files changed, 10 insertions(+), 10 deletions(-)
Comment 9 Hans de Graaff gentoo-dev Security 2018-11-13 18:51:48 UTC
(In reply to Marco Genasci from comment #7)

> Ok the variables in the files are not overwrite but merged if I change in
> amd64/make.defaults from RUBY_TARGETS="ruby23" to RUBY_TARGETS="ruby23
> -ruby24" works

I just came to the same conclusion. Fixed now in git. Thanks for the report.
Comment 10 Lik 2018-11-14 10:29:13 UTC
Want to resurrect this bug, because it introduced new errors. Exact error message below: 

Invalid '-' operator in non-incremental variable 'RUBY_TARGETS': '-ruby24'

In make.conf I have custom RUBY_TARGETS defined:

# grep RUBY_TARGETS /etc/portage/make.conf
RUBY_TARGETS="${RUBY_TARGETS} ruby24 ruby25"

According to https://wiki.gentoo.org/wiki/Ruby it is perfectly valid use case to add new implementation of ruby.

Error message appears even in case 'ruby24 ruby25' omitted:
RUBY_TARGETS="${RUBY_TARGETS}"

Finally, no error message in case RUBY_TARGETS is not set in make.conf:

# emerge --info | grep RUBY_TARGETS
RUBY_TARGETS="ruby23"
Comment 11 Marco Genasci 2018-11-14 14:32:02 UTC
Another thing, why ruby_targets_ruby24 in arch/amd64/use.stable.mask is not triggered in a stable system

Current:
# emerge -pvq racc
[ebuild   R   ] dev-ruby/racc-1.4.14  USE="-doc -test" RUBY_TARGETS="ruby23 -ruby24 -ruby25" 

# Expected
[ebuild   R   ] dev-ruby/racc-1.4.14  USE="-doc -test" RUBY_TARGETS="ruby23 (-ruby24) -ruby25
Comment 12 Larry the Git Cow gentoo-dev 2018-11-28 23:08:32 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e79e532d2563c4eae769876fd7cc7e6f3fac12da

commit e79e532d2563c4eae769876fd7cc7e6f3fac12da
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2018-11-28 23:04:51 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2018-11-28 23:04:51 +0000

    profiles/arch/*/make.defaults: tweak RUBY_TARGETS override
    
    Unfortunately RUBY_TARGETS does not have merge semantics
    and just overrides value from parent profile. Thus
        RUBY_TARGETS="ruby23 -ruby24"
    is not valid and yields error spam like:
        Invalid '-' operator in non-incremental variable 'RUBY_TARGETS': '-ruby24'
    
    Just drop RUBY_TARGETS="-ruby" part. The change should be a no-op.
    
    Bug: https://bugs.gentoo.org/671064
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 profiles/arch/alpha/make.defaults         | 2 +-
 profiles/arch/arm/make.defaults           | 2 +-
 profiles/arch/hppa/make.defaults          | 2 +-
 profiles/arch/ia64/make.defaults          | 2 +-
 profiles/arch/powerpc/ppc32/make.defaults | 2 +-
 profiles/arch/powerpc/ppc64/make.defaults | 2 +-
 profiles/arch/s390/make.defaults          | 2 +-
 profiles/arch/sparc/make.defaults         | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)