Skip to content

Commit

Permalink
qt module: correctly compare program name for lrelease version
Browse files Browse the repository at this point in the history
(b, name) will always have the canonical tool name, not just a
potentially weird bin path. We need to check stderr for qt4 tools other
than lrelease, but we keyed off of the tool bin path, so matches were by
no means guaranteed, and specifically, would fail if the tool is looked
up via bindir.

This really should always have checked the canonical name, which is
guaranteed to be correct.

Partial fix for #10443
  • Loading branch information
eli-schwartz authored and nirbheek committed Aug 8, 2022
1 parent bcb382b commit c6d0cb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mesonbuild/modules/qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def gen_bins() -> T.Generator[T.Tuple[str, str], None, None]:
# Ensure that the version of qt and each tool are the same
def get_version(p: ExternalProgram) -> str:
_, out, err = Popen_safe(p.get_command() + arg)
if b.startswith('lrelease') or not qt_dep.version.startswith('4'):
if name == 'lrelease' or not qt_dep.version.startswith('4'):
care = out
else:
care = err
Expand Down

0 comments on commit c6d0cb6

Please sign in to comment.