Hi.
I looked at meson.build file at found an incorrectly used function to
determine postgres version.
> if pg_version.endswith('devel')
> pg_version_arr = [pg_version.split('devel')[0], '0']
There should be `pg_version.contains('devel')`, not `endswith`. Like this:
-if pg_version.endswith('devel')
+if pg_version.contains('devel')
Next statement seems to be valid:
>elif pg_version.contains('beta')
> pg_version_arr = [pg_version.split('beta')[0], '0']
>elif pg_version.contains('rc')
> pg_version_arr = [pg_version.split('rc')[0], '0']
>else
> pg_version_arr = pg_version.split('.')
>endif
I created a single line patch for it.
From b0a46ae68c9370b686ba3b1d2c55ab0eaefd68c1 Mon Sep 17 00:00:00 2001
From: ashenBlade <[email protected]>
Date: Wed, 14 Aug 2024 16:53:34 +0300
Subject: [PATCH] Invalid version string split in meson
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index 8e3fae3cb7..1159c9d068 100644
--- a/meson.build
+++ b/meson.build
@@ -121,7 +121,7 @@ cdata = configuration_data()
pg_version = meson.project_version()
-if pg_version.endswith('devel')
+if pg_version.contains('devel')
pg_version_arr = [pg_version.split('devel')[0], '0']
elif pg_version.contains('beta')
pg_version_arr = [pg_version.split('beta')[0], '0']
--
2.34.1