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 <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-06-01 17:52:56 +02:00 committed by janware DevOps
commit aadcdfb5f3
Signed by: DevOps
SSH key fingerprint: SHA256:cZiw7ExG5q3KAVm7Jse3rGITowu0VjgUgNMPbifmY8g

View file

@ -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: