Noticed a few days ago emerge compains about invalid profile syntax: Invalid '-' operator in non-incremental variable 'RUBY_TARGETS': '-ruby25' on ia64 and ppc64 profiles emerge issues warnings on every operation.
I can't reproduce this on amd64 even though it currently has the same setup, either with or without a RUBY_TARGETS in /etc/make.conf. The error message is also weird: my testing clearly shows that RUBY_TARGETS is incremental at least within profiles, because (at least on amd64) adding -ruby25 in arch/amd64/make.defaults clearly negates ruby25 in base/make.defaults. This is also the reason that -ruby25 is there: without it people get errors because portage wants to install ruby25 due to RUBY_TARGETS in base/make.defaults even though it is still stable use masked.
Looking at precise syntax on ia64 file: profiles/arch/ia64/make.defaults RUBY_TARGETS="ruby24 -ruby25" Trying on amd64: $ RUBY_TARGETS="ruby24 -ruby25" emerge -pv1 lv Invalid '-' operator in non-incremental variable 'RUBY_TARGETS': '-ruby25' Is it not the behaviour you see?
(In reply to Sergei Trofimovich from comment #2) > Looking at precise syntax on ia64 file: > profiles/arch/ia64/make.defaults > RUBY_TARGETS="ruby24 -ruby25" You are leaving out profiles/base/make.defaults which has RUBY_TARGETS="ruby24 ruby25" So the effective case is that RUBY_TARGETS="ruby24". > Trying on amd64: > > $ RUBY_TARGETS="ruby24 -ruby25" emerge -pv1 lv > Invalid '-' operator in non-incremental variable 'RUBY_TARGETS': '-ruby25' > > Is it not the behaviour you see? If I explicitly use RUBY_TARGETS in this way, yes. But not in the default case (without RUBY_TARGETS on command line or in /etc/portage/make.conf) because the -ruby25 gets resolved before that in the profiles, leading to a valid RUBY_TARGETS="ruby24".
(In reply to Hans de Graaff from comment #3) > (In reply to Sergei Trofimovich from comment #2) > > Looking at precise syntax on ia64 file: > > profiles/arch/ia64/make.defaults > > RUBY_TARGETS="ruby24 -ruby25" > > You are leaving out profiles/base/make.defaults which has > RUBY_TARGETS="ruby24 ruby25" > > So the effective case is that RUBY_TARGETS="ruby24". > > > Trying on amd64: > > > > $ RUBY_TARGETS="ruby24 -ruby25" emerge -pv1 lv > > Invalid '-' operator in non-incremental variable 'RUBY_TARGETS': '-ruby25' > > > > Is it not the behaviour you see? > > If I explicitly use RUBY_TARGETS in this way, yes. But not in the default > case (without RUBY_TARGETS on command line or in /etc/portage/make.conf) > because the -ruby25 gets resolved before that in the profiles, leading to a > valid RUBY_TARGETS="ruby24". If I read https://dev.gentoo.org/~ulm/pms/head/pms.html#x1-560005.3.1 correctly only USE itself is treated as an incremental variable. Thus I suspect RUBY_TARGETS="ruby24 -ruby25" is not a valid expression in a profile. USE="ruby_targets_ruby24 -ruby_targets_ruby24" probably would be correct.
(In reply to Sergei Trofimovich from comment #4) > If I read https://dev.gentoo.org/~ulm/pms/head/pms.html#x1-560005.3.1 > correctly only USE itself is treated as an incremental variable. Thus I > suspect RUBY_TARGETS="ruby24 -ruby25" is not a valid expression in a profile. In section 5.3.2 it says: USE_EXPAND Defines a list of variables which are to be treated incrementally and whose contents are to be expanded into the USE variable as passed to ebuilds. So all USE_EXPAND variables, which RUBY_TARGETS is, are also to be treated incrementally. So that explains why I see the incremental behaviour in the profiles, but it still does not explain why you are seeing this issue on ia64 and ppc64.
(In reply to Hans de Graaff from comment #5) > (In reply to Sergei Trofimovich from comment #4) > > > If I read https://dev.gentoo.org/~ulm/pms/head/pms.html#x1-560005.3.1 > > correctly only USE itself is treated as an incremental variable. Thus I > > suspect RUBY_TARGETS="ruby24 -ruby25" is not a valid expression in a profile. > > In section 5.3.2 it says: > > USE_EXPAND > Defines a list of variables which are to be treated incrementally and > whose contents are to be expanded into the USE variable as passed to ebuilds. > > So all USE_EXPAND variables, which RUBY_TARGETS is, are also to be treated > incrementally. > > So that explains why I see the incremental behaviour in the profiles, but it > still does not explain why you are seeing this issue on ia64 and ppc64. Oh, good point! Both of those machines have the following expression that triggers it: /etc/portage/make.conf RUBY_TARGETS="${RUBY_TARGETS} ruby23 ruby24" It's a leftover from past stabilization and should have been a RUBY_TARGETS="ruby23 ruby24". Closing as INVALID. Apologies for the noise!
I just encountered this same problem, and my make.conf has RUBY_TARGETS="${RUBY_TARGETS} ruby25" I presume I'm right in thinking that deleting the ${RUBY_TARGETS} portion would fix the issue? (I'd also like to know why this changed, and why the error message lies about what RUBY_TARGETS is.)
(In reply to rnddim from comment #7) > I just encountered this same problem, and my make.conf has > > RUBY_TARGETS="${RUBY_TARGETS} ruby25" > > I presume I'm right in thinking that deleting the ${RUBY_TARGETS} portion > would fix the issue? (I'd also like to know why this changed, and why the > error message lies about what RUBY_TARGETS is.) Yeah, RUBY_TARGETS="ruby25" should be the correct syntax of appending to existing list.
(In reply to Sergei Trofimovich from comment #6) > Apologies for the noise! No need, I'm glad we could figure this out. I'm sure this will come up in the future as well and now we know why this is an issue.