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: 02518e598e ("meson: Rewrite .replace usage")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Michael Riesch <michael.riesch@wolfvision.net>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
committed by
Kieran Bingham
parent
2ccca099d3
commit
d34cefad17
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user