From: Daan De Meyer Date: Sat, 13 Apr 2024 18:31:32 +0000 (+0200) Subject: Remove 'v' prefix from systemd tool versions X-Git-Tag: v23~4^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1faa03326dac5fea79231638803cf068355fd9cc;p=thirdparty%2Fmkosi.git Remove 'v' prefix from systemd tool versions Some older systemd versions still have a 'v' prefix in them, let's make sure we take that into account. --- diff --git a/mkosi/config.py b/mkosi/config.py index 1fe456922..71ce74f79 100644 --- a/mkosi/config.py +++ b/mkosi/config.py @@ -4224,5 +4224,9 @@ def want_selinux_relabel(config: Config, root: Path, fatal: bool = True) -> Opti def systemd_tool_version(config: Config, tool: PathString) -> GenericVersion: return GenericVersion( - run([tool, "--version"], stdout=subprocess.PIPE, sandbox=config.sandbox()).stdout.split()[2].strip("()") + run( + [tool, "--version"], + stdout=subprocess.PIPE, + sandbox=config.sandbox() + ).stdout.split()[2].strip("()").removeprefix("v") )