commit:     50155ff507b8196cbeb10b2d929f0710f55212d3
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sat Jul  5 11:51:23 2025 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sat Jul  5 12:42:26 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50155ff5

qt6-build.eclass: assert the qtdeclarative dependency with USE=qml

Unclear what really happened in bug #959567, but either way
I think it wouldn't hurt to add this so that we can either stop
suspecting portage, or catch the issue in a clearer way.

Bug: https://bugs.gentoo.org/959567
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 eclass/qt6-build.eclass | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/eclass/qt6-build.eclass b/eclass/qt6-build.eclass
index 462de4e0b1ad..8af563a432fd 100644
--- a/eclass/qt6-build.eclass
+++ b/eclass/qt6-build.eclass
@@ -118,6 +118,19 @@ qt6-build_src_unpack() {
 # QT6_PREFIX, QT6_LIBDIR, and others), and handle anything else
 # generic as needed.
 qt6-build_src_prepare() {
+       # There is a suspicion that there "may" still be portage ordering issues
+       # when Qt's complex depgraph is involved, e.g. build a package with 
USE=qml
+       # before (matching) qtdeclarative version is updated despite all these
+       # packages DEPEND on ~qtdeclarative-${PV}. Tentatively assert to see if
+       # if the issue really exists (bug #959567).
+       if in_iuse qml && use qml && ! has_version -d 
"~dev-qt/qtdeclarative-${PV}"
+       then
+               eerror "${CATEGORY}/${PN}[qml] depends on 
~dev-qt/qtdeclarative-${PV}"
+               eerror "but it has not been upgraded/installed yet, implies 
that there"
+               eerror "is a bug in the package manager assuming normal usage."
+               die "aborting to avoid installing a broken package"
+       fi
+
        # Qt has quite a lot of unused (false positive) CMakeLists.txt
        local CMAKE_QA_COMPAT_SKIP=1
 

Reply via email to