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
6db73873introduced App.__proj_dir(), which now raises an Exception if passed garbage, which in turn surfaces asException: 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:
parent
59e0c3eaab
commit
aadcdfb5f3
1 changed files with 7 additions and 12 deletions
|
|
@ -652,19 +652,14 @@ class App(Base):
|
||||||
|
|
||||||
def is_excluded_from_build(self, project: str) -> str | None:
|
def is_excluded_from_build(self, project: str) -> str | None:
|
||||||
log(DEBUG, 'checking if project ' + project + ' is excluded from build')
|
log(DEBUG, 'checking if project ' + project + ' is excluded from build')
|
||||||
exclude = self.get_project_refs(
|
exclude = self.get_value(project, 'build', 'exclude')
|
||||||
[project],
|
if exclude is None:
|
||||||
['build'],
|
return None
|
||||||
'exclude',
|
exclude_arr = re.split(r'[, ]+', exclude)
|
||||||
scope = Scope.One,
|
|
||||||
add_self = False,
|
|
||||||
names_only = True,
|
|
||||||
)
|
|
||||||
cascade = self.distro.os_cascade + ['all']
|
cascade = self.distro.os_cascade + ['all']
|
||||||
for p1 in exclude:
|
intersection = [x for x in cascade if x in set(exclude_arr)]
|
||||||
for p2 in cascade:
|
if intersection:
|
||||||
if p1 == p2:
|
return ', '.join(intersection)
|
||||||
return p1
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def find_circular_deps(self, projects: list[str], flavours: list[str]) -> bool:
|
def find_circular_deps(self, projects: list[str], flavours: list[str]) -> bool:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue