From d34cefad17918a37e48c2a9fadd63480e6661d6e Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 9 Mar 2023 19:21:15 +0200 Subject: meson: Fix git version parsing When extracting the build metadata from the git version, we use the string strip() method to remove the version prefix. This is incorrect, as the strip() method takes a set of characters to be removed, not a literal string. Fix it by splitting the git version string on the '+' character and keeping the suffix. Fixes: 02518e598e8f ("meson: Rewrite .replace usage") Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Michael Riesch Signed-off-by: Kieran Bingham --- meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 0f89b45a..189e9773 100644 --- a/meson.build +++ b/meson.build @@ -41,8 +41,8 @@ if libcamera_version != project_version # Replace the version components reported by git with the release version, # but keep all trailing information supplied by git. - libcamera_git_version = (project_version + - libcamera_git_version.strip(libcamera_version)) + libcamera_git_version = (project_version + '+' + + libcamera_git_version.split('+')[1]) libcamera_version = project_version # Append a marker to show we have modified this version string -- cgit v1.2.1