[sdk/kde-builder] kde_builder_lib: remove: Remove unused code for catch-all dependent items

Andrew Shark <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 76eb641739af53b23520ce37a1b17d2a6ee776c9 by Andrew Shark.
Committed on 02/08/2026 at 21:44.
Pushed by ashark into branch 'master'.

remove: Remove unused code for catch-all dependent items

From to README.md in the repo-metadata dependencies dir (the legacy dir,
kde-builder no longer uses it) about wildcarded dependent items:

  kdevelop/utilities/*: kdevelop/kdevelop

  A wildcard format would be permissible to force all modules in that XML path
  to develop on some module `$foo` (except `$foo` itself, if `$foo` happens to be in
  that set). However, this still is not coded or fully fleshed out.

In the very old revisions of dependency-data-kf5-qt5 file I saw such entries:

  # Everything needs Qt 5 and ECM
  *: third-party/Qt5
  *: frameworks/extra-cmake-modules

  # The generic dependency on all frameworks
  kde/*: frameworks/kf5umbrella

But since 2022 December 9, dependency-data files were autogenerated.
See https://invent.kde.org/sysadmin/repo-metadata/-/merge_requests/124.
Now all kde dependencies are marked explicitly in their repos, and
we no longer need this code for catch-all dependent items.

M  +0    -29   kde_builder_lib/dependency_resolver.py

https://invent.kde.org/sdk/kde-builder/-/commit/76eb641739af53b23520ce37a1b17d2a6ee776c9

diff --git a/kde_builder_lib/dependency_resolver.py b/kde_builder_lib/dependency_resolver.py
index 841aac75..596a5a6d 100644
--- a/kde_builder_lib/dependency_resolver.py
+++ b/kde_builder_lib/dependency_resolver.py
@@ -46,11 +46,6 @@ class DependencyResolver:
         list of module:branch dependencies.
         """
 
-        self.catch_all_dependencies = {}
-        """
-        Dict mapping a wildcarded module name with no branch to a list of module:branch dependencies.
-        """
-
         self.module_resolver = module_resolver
         """
         ModuleResolver object, that will properly create a `Module` from a given kde-project module name. Used to support automatically adding dependencies to a build.
@@ -156,11 +151,6 @@ class DependencyResolver:
                 source_item = None
                 source_branch = None
 
-            # Ignore "catch-all" dependencies where the source is the catch-all
-            if source_item.endswith("*"):
-                logger_depres.warning("\tIgnoring dependency on wildcard project grouping " + f"on line {fh.filelineno()} of repo-metadata/dependencies/dependency-data")
-                continue
-
             dependent_branch = dependent_branch or "*"  # If no branch, apply catch-all flag
             source_branch = source_branch or "*"
 
@@ -168,16 +158,7 @@ class DependencyResolver:
             dep_key = "-" if source_item.startswith("-") else "+"
             source_item = re.sub("^-", "", source_item)  # remove negation marker if name already short
 
-            # Source can never be a catch-all, so we can shorten early. Also,
-            # we *must* shorten early to avoid a dependency on a long path.
             source_item = self._shorten_module_name(source_item)
-
-            # Handle catch-all dependent groupings
-            if re.match(r"\*$", dependent_item):
-                self.catch_all_dependencies[dependent_item] = self.catch_all_dependencies.get(dependent_item, [])
-                self.catch_all_dependencies[dependent_item].append(f"{source_item}:{source_branch}")
-                continue
-
             dependent_item = self._shorten_module_name(dependent_item)
 
             self._add_dependency(dependent_item, dependent_branch, source_item, source_branch, dep_key)
@@ -214,16 +195,6 @@ class DependencyResolver:
                 direct_deps.extend(module_dep_entry["+"])
                 exclusions.extend(module_dep_entry["-"])
 
-        # Apply catch-all dependencies but only for KDE modules, not third-party modules.
-        # See _get_dependency_path_of() for how this is detected.
-        if not re.match(r"^third-party/", module_name):
-            for catch_all, deps in self.catch_all_dependencies.items():
-                prefix = catch_all
-                prefix = re.sub(r"\*$", "", prefix)
-
-                if re.match(f"^{prefix}", path) or not prefix:
-                    direct_deps.extend(deps)
-
         for exclusion in exclusions:
             # Remove only modules at the exact given branch as a dep.
             # However, catch-alls can remove catch-alls.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.