[PATCH 2/3] qt-utils.eclass: Deprecate all qt6_* functions (ban qt6_get_libdir)

Andreas Sturmlechner <[email protected]> Wed, 08 Jul 2026 21:49:57 +0200
Newsgroups gmane.linux.gentoo.devel
Message-ID <[email protected]>
--nextPartq1kJI3dVSQGB1pT9gH1M6Q
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="utf-8"; protected-headers="v1"
From: Andreas Sturmlechner <[email protected]>
To: [email protected], [email protected]
Date: Wed, 08 Jul 2026 21:49:57 +0200
Message-ID: <[email protected]>
In-Reply-To: <[email protected]>
References: <[email protected]>
MIME-Version: 1.0

Deprecate all legacy qt6_* functions
In deprecated qt6_get_bindir(), EPREFIX remains hardcoded
For EAPI-9, ban qt6_get_libdir w/o direct replacement; it is too basic

Signed-off-by: Andreas Sturmlechner <[email protected]>
---
 eclass/qt-utils.eclass | 41 ++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 40 insertions(+), 1 deletion(-)

diff --git a/eclass/qt-utils.eclass b/eclass/qt-utils.eclass
index 97de2a4ca741..871fccde77c9 100644
--- a/eclass/qt-utils.eclass
+++ b/eclass/qt-utils.eclass
@@ -22,6 +22,33 @@ case ${EAPI} in
 	*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
 esac
 
+# @FUNCTION: _qt_eapi9_banned_deprecated_func
+# @INTERNAL
+# @DESCRIPTION:
+# Banned functions are banned. Deprecated functions are ...
+_qt_eapi9_banned_deprecated_func() {
+	[[ ${EAPI} == 8 ]] && return
+
+	_deprecated_use_instead() {
+		eqawarn "QA Notice: ${1} is deprecated and will be banned after EAPI 9 -"
+		eqawarn "    use '${2}' instead."
+	}
+
+	case ${FUNCNAME[1]} in
+		qt6_get_bindir|qt6_get_libexecdir)
+			_deprecated_use_instead ${FUNCNAME[1]} "${FUNCNAME[1]/qt6/qt} 6' or 'qt_get_broot_binary 6 <binary>"
+			[[ ${FUNCNAME[1]} == qt6_get_bindir ]] &&
+				eqawarn "    IMPORTANT: ${FUNCNAME[1]/qt6/qt} no longer prepends EPREFIX!"
+			;;
+		qt6_get_libdir)
+			die "${FUNCNAME[1]} is banned. New 'qt_get_archdatadir 6' is equivalent to \$(qt6_get_libdir)/qt6"
+			;;
+		qt6_get_*)
+			_deprecated_use_instead ${FUNCNAME[1]} "${FUNCNAME[1]/qt6/qt} 6"
+			;;
+	esac
+}
+
 # @FUNCTION: _qt_get_check_func_call
 # @INTERNAL
 # @DESCRIPTION:
@@ -90,45 +117,57 @@ qt_get_plugindir() {
 }
 
 # @FUNCTION: qt6_get_bindir
+# @DEPRECATED
 # @DESCRIPTION:
 # Echoes the directory where Qt6 binaries are installed.
-# EPREFIX is already prepended to the returned path.
+# EPREFIX is always prepended to the returned path.
 qt6_get_bindir() {
+	_qt_eapi9_banned_deprecated_func
 	qt_get_bindir 6
 }
 
 # @FUNCTION: qt6_get_headerdir
+# @DEPRECATED
 # @DESCRIPTION:
 # Echoes the directory where Qt6 headers are installed.
 qt6_get_headerdir() {
+	_qt_eapi9_banned_deprecated_func
 	qt_get_headerdir 6
 }
 
 # @FUNCTION: qt6_get_libdir
+# @DEPRECATED
 # @DESCRIPTION:
 # Echoes the directory where Qt6 libraries are installed.
 qt6_get_libdir() {
+	_qt_eapi9_banned_deprecated_func
 	echo "/usr/$(get_libdir)"
 }
 
 # @FUNCTION: qt6_get_libexecdir
+# @DEPRECATED
 # @DESCRIPTION:
 # Echoes the directory where Qt6 libexec bins are installed.
 qt6_get_libexecdir() {
+	_qt_eapi9_banned_deprecated_func
 	qt_get_libexecdir 6
 }
 
 # @FUNCTION: qt6_get_mkspecsdir
+# @DEPRECATED
 # @DESCRIPTION:
 # Echoes the directory where Qt6 mkspecs are installed.
 qt6_get_mkspecsdir() {
+	_qt_eapi9_banned_deprecated_func
 	qt_get_mkspecsdir 6
 }
 
 # @FUNCTION: qt6_get_plugindir
+# @DEPRECATED
 # @DESCRIPTION:
 # Echoes the directory where Qt6 plugins are installed.
 qt6_get_plugindir() {
+	_qt_eapi9_banned_deprecated_func
 	qt_get_plugindir 6
 }
 
-- 
2.55.0


--nextPartq1kJI3dVSQGB1pT9gH1M6Q
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part.
Content-Transfer-Encoding: 7Bit

-----BEGIN PGP SIGNATURE-----

iQIvBAABCgCZFiEE34gXUSooizdYNDu3S5FW4z0PgBkFAmpOqeUbFIAAAAAABAAO
bWFudTIsMi41KzEuMTIsMiwyXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25z
Lm9wZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRERjg4MTc1MTJBMjg4QjM3NTgzNDNC
Qjc0QjkxNTZFMzNEMEY4MDE5AAoJEEuRVuM9D4AZ8gML/isqg+yOZnmNUNTXZwot
2AylbOoUV3yslqMnHNyhYAXOwKfKxcoxWo3qLiYTSbGuJ76xYXOo514ez5oim1X9
BG1dWUQtPFi6pZ8tWnLYiqvCFjshL02C6oyYN3xgWbc9EfPINv5J4tbgRYdyFvSe
yDoXOh5PxWi801iDmAuGKsR/0lhglCxSlL9kzX7J/55dPweeDWYbJlfvAlbxw804
o/aNxOtQULkLEOl23jUN5GPrVG84EhgATKvKh2Nn1ZSzUOTd/BesumEfiNL6OJk0
wi2MVfkR8tFi5GU9nwsZhMdK0UPKxvXyEk20l/pA5xn6GAZijSVb8kfis1FZcJyw
9bFSGCfoOgC9LpTeaMA1fwymiReNdEcl5W08dydUGMv6jqSKRcgnXPhteZefPORK
us/31gOT5fiQdIU0n83ovE9jorskrkEsZ2UfNkTx14eNsIl41Iey7av4fs53tCT3
NaLCH9QHkXOzLonX6SeTz4fbrdDL8W+vy2hwZVnUsK1f+g==
=VbQk
-----END PGP SIGNATURE-----

--nextPartq1kJI3dVSQGB1pT9gH1M6Q--