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: