public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH 0/2] Lua eclasses: prepare for dropping lua5-2 support
@ 2021-07-23 23:20 Marek Szuba
  2021-07-23 23:20 ` [gentoo-dev] [PATCH 1/2] lua-utils.eclass: new eclass variable _LUA_HISTORICAL_IMPLS Marek Szuba
  2021-07-23 23:20 ` [gentoo-dev] [PATCH 2/2] lua-single.eclass: consider historical impls in _lua_verify_patterns() Marek Szuba
  0 siblings, 2 replies; 3+ messages in thread
From: Marek Szuba @ 2021-07-23 23:20 UTC (permalink / raw
  To: gentoo-dev

If memory serves me right there _are_ ebuilds which mention lua5-2 in
lua_gen_cond_dep() calls. Let's steal another idea from Python eclasses
and allow this implementation not to trip pattern validation in spite of
no longer being supported by the eclasses, by be declaring it a
historical implementation.

For the time being the list of historical implementations is empty, will
move lua5-2 to it on the scheduled date.

-- 
Marecki




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [gentoo-dev] [PATCH 1/2] lua-utils.eclass: new eclass variable _LUA_HISTORICAL_IMPLS
  2021-07-23 23:20 [gentoo-dev] [PATCH 0/2] Lua eclasses: prepare for dropping lua5-2 support Marek Szuba
@ 2021-07-23 23:20 ` Marek Szuba
  2021-07-23 23:20 ` [gentoo-dev] [PATCH 2/2] lua-single.eclass: consider historical impls in _lua_verify_patterns() Marek Szuba
  1 sibling, 0 replies; 3+ messages in thread
From: Marek Szuba @ 2021-07-23 23:20 UTC (permalink / raw
  To: gentoo-dev

Similarly to _PYTHON_HISTORICAL_IMPLS, it will hold names of Lua
implementations which used to be supported but no longer are.

Signed-off-by: Marek Szuba <marecki@gentoo.org>
---
 eclass/lua-utils.eclass | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/eclass/lua-utils.eclass b/eclass/lua-utils.eclass
index 278bbca58a3..12067928002 100644
--- a/eclass/lua-utils.eclass
+++ b/eclass/lua-utils.eclass
@@ -40,6 +40,13 @@ _LUA_ALL_IMPLS=(
 )
 readonly _LUA_ALL_IMPLS
 
+# @ECLASS-VARIABLE: _LUA_HISTORICAL_IMPLS
+# @INTERNAL
+# @DESCRIPTION:
+# All historical Lua implementations that are no longer supported.
+_LUA_HISTORICAL_IMPLS=()
+readonly _LUA_HISTORICAL_IMPLS
+
 # @FUNCTION: _lua_set_impls
 # @INTERNAL
 # @DESCRIPTION:
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-dev] [PATCH 2/2] lua-single.eclass: consider historical impls in _lua_verify_patterns()
  2021-07-23 23:20 [gentoo-dev] [PATCH 0/2] Lua eclasses: prepare for dropping lua5-2 support Marek Szuba
  2021-07-23 23:20 ` [gentoo-dev] [PATCH 1/2] lua-utils.eclass: new eclass variable _LUA_HISTORICAL_IMPLS Marek Szuba
@ 2021-07-23 23:20 ` Marek Szuba
  1 sibling, 0 replies; 3+ messages in thread
From: Marek Szuba @ 2021-07-23 23:20 UTC (permalink / raw
  To: gentoo-dev

This is so that lua_gen_foo() calls die on mentions of formerly
supported implementations, allowing for such mentions to be gradually
removed from ebuilds which contain them.

Signed-off-by: Marek Szuba <marecki@gentoo.org>
---
 eclass/lua-single.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/lua-single.eclass b/eclass/lua-single.eclass
index ab4fdb3c75a..f55c3f80948 100644
--- a/eclass/lua-single.eclass
+++ b/eclass/lua-single.eclass
@@ -348,7 +348,7 @@ _lua_verify_patterns() {
 
 	local impl pattern
 	for pattern; do
-		for impl in "${_LUA_ALL_IMPLS[@]}"; do
+		for impl in "${_LUA_ALL_IMPLS[@]}" "${_LUA_HISTORICAL_IMPLS[@]}"; do
 			[[ ${impl} == ${pattern/./-} ]] && continue 2
 		done
 
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-23 23:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-23 23:20 [gentoo-dev] [PATCH 0/2] Lua eclasses: prepare for dropping lua5-2 support Marek Szuba
2021-07-23 23:20 ` [gentoo-dev] [PATCH 1/2] lua-utils.eclass: new eclass variable _LUA_HISTORICAL_IMPLS Marek Szuba
2021-07-23 23:20 ` [gentoo-dev] [PATCH 2/2] lua-single.eclass: consider historical impls in _lua_verify_patterns() Marek Szuba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox