From: Daan De Meyer Date: Sun, 10 Dec 2023 16:10:33 +0000 (+0100) Subject: Return full version from systemd_tool_version() X-Git-Tag: v20~85^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d2ae755a3c1a6805150705c18ccda3c0bfebaec;p=thirdparty%2Fmkosi.git Return full version from systemd_tool_version() Let's allow comparing against stable releases as well by returning the full version. --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 066df44c5..4b3b8a8ba 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -1848,7 +1848,7 @@ def check_outputs(config: MkosiConfig) -> None: def systemd_tool_version(tool: PathString) -> GenericVersion: - return GenericVersion(run([tool, "--version"], stdout=subprocess.PIPE).stdout.split()[1]) + return GenericVersion(run([tool, "--version"], stdout=subprocess.PIPE).stdout.split()[2].strip("()")) def check_systemd_tool(*tools: PathString, version: str, reason: str, hint: Optional[str] = None) -> None: