From aadcdfb5f3b063c4e837a59217c00dc7c3091bc4 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Mon, 1 Jun 2026 17:52:56 +0200 Subject: [PATCH] App.is_excluded_from_build(): App.is_excluded_from_build() uses the wrong function entirely to query the [build.exclude] section of project.conf (App.get_project_refs() instead of App.get_value()). This has obviously never worked. It rose to prominence because commit 6db73873 introduced App.__proj_dir(), which now raises an Exception if passed garbage, which in turn surfaces as Exception: No project path found for module "debian" Use the correct function for that: App.get_value(). Signed-off-by: Jan Lindemann --- src/python/jw/pkg/App.py | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/python/jw/pkg/App.py b/src/python/jw/pkg/App.py index 61643bb2..c748f16e 100644 --- a/src/python/jw/pkg/App.py +++ b/src/python/jw/pkg/App.py @@ -652,19 +652,14 @@ class App(Base): def is_excluded_from_build(self, project: str) -> str | None: log(DEBUG, 'checking if project ' + project + ' is excluded from build') - exclude = self.get_project_refs( - [project], - ['build'], - 'exclude', - scope = Scope.One, - add_self = False, - names_only = True, - ) + exclude = self.get_value(project, 'build', 'exclude') + if exclude is None: + return None + exclude_arr = re.split(r'[, ]+', exclude) cascade = self.distro.os_cascade + ['all'] - for p1 in exclude: - for p2 in cascade: - if p1 == p2: - return p1 + intersection = [x for x in cascade if x in set(exclude_arr)] + if intersection: + return ', '.join(intersection) return None def find_circular_deps(self, projects: list[str], flavours: list[str]) -> bool: