[sdk/kde-builder] kde_builder_lib: refactor: Move check for ignoring due to qt-install-dir to filter_out_unneeded_modules()
Andrew Shark <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit f29f6a04156d4c56f02a12a9199d2e2a1296df02 by Andrew Shark.
Committed on 19/07/2026 at 17:20.
Pushed by ashark into branch 'master'.
refactor: Move check for ignoring due to qt-install-dir to filter_out_unneeded_modules()
M +0 -10 kde_builder_lib/application.py
M +9 -0 kde_builder_lib/module_resolver.py
https://invent.kde.org/sdk/kde-builder/-/commit/f29f6a04156d4c56f02a12a9199d2e2a1296df02
diff --git a/kde_builder_lib/application.py b/kde_builder_lib/application.py
index 70213e8a..418dda40 100644
--- a/kde_builder_lib/application.py
+++ b/kde_builder_lib/application.py
@@ -292,16 +292,6 @@ class Application:
filtered_modules: list[Module] = []
for module in modules:
- if module.module_set and module.module_set.name in ["qt6-set"]:
- if module.get_option("install-dir") == "":
- # User may have set their qt-install-dir option to empty string (the default), which means disabling building qt modules.
- # But still user can accidentally request to build some qt modules (by explicitly specifying such modules in cmdline, or
- # by building all when not specifying any). We should not allow building qt modules in such case.
- # Otherwise, as their real "install-dir" is empty, their CMAKE_INSTALL_PREFIX will be incorrect (set to empty), and such
- # modules could not pass cmake configure.
- logger_app.warning(f" y[*] Removing y[third-party]/y[{module.name}] due to qt-install-dir")
- continue
-
if module.is_kde_project():
repopath = module.get_repopath()
branch = resolver.resolve_branch_group(repopath or module.name, branch_group)
diff --git a/kde_builder_lib/module_resolver.py b/kde_builder_lib/module_resolver.py
index 015e7ca3..2b1048b7 100644
--- a/kde_builder_lib/module_resolver.py
+++ b/kde_builder_lib/module_resolver.py
@@ -316,6 +316,15 @@ class ModuleResolver:
else:
logger_modres.debug(f"Group y[{module_set_name}] is ignored, so project y[{module.name}] was removed.")
continue
+ elif module_set_name in ["qt6-set"]:
+ if module.get_option("install-dir") == "":
+ # User may have set their qt-install-dir option to empty string (the default), which means disabling building qt modules.
+ # But still user can accidentally request to build some qt modules (by explicitly specifying such modules in cmdline, or
+ # by building all). We should not allow building qt modules in such case.
+ # Otherwise, as their real "install-dir" is empty, their CMAKE_INSTALL_PREFIX will be incorrect (set to empty), and such
+ # modules could not pass cmake configure.
+ logger_modres.warning(f" y[*] Removing y[third-party]/y[{module.name}] due to qt-install-dir")
+ continue
else:
filtered_modules.append(module)