This is an automated email from the ASF dual-hosted git repository.
okislal pushed a commit to branch madlib2-master
in repository https://gitbox.apache.org/repos/asf/madlib.git
The following commit(s) were added to refs/heads/madlib2-master by this push:
new 66f3fe9e Madpack: Add the actual path of $libdir
66f3fe9e is described below
commit 66f3fe9e5f55fb91be72832d71b5f7813fd1103f
Author: Orhan Kislal <[email protected]>
AuthorDate: Tue Aug 22 16:58:29 2023 +0300
Madpack: Add the actual path of $libdir
MADlib has to set dynamic_library_path but gpconfig do not work with the
default value $libdir. We get the full libdir path and use it instead of
the variable.
---
src/madpack/madpack.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/madpack/madpack.py b/src/madpack/madpack.py
index 7c91911b..92836a12 100755
--- a/src/madpack/madpack.py
+++ b/src/madpack/madpack.py
@@ -1332,11 +1332,18 @@ def set_dynamic_library_path_in_database(dbver_split,
madlib_library_path):
global dynamic_library_path
dynamic_library_path = _internal_run_query("SHOW dynamic_library_path",
True)[0]['dynamic_library_path']
- # GP7 gpconfig messes up $libdir so we remove it for now
+ # GP7 gpconfig messes up $libdir so we put the actual path
paths = dynamic_library_path.split(":")
if madlib_library_path not in paths:
if '$libdir' in paths:
paths.remove('$libdir')
+ libdir = subprocess.check_output(['pg_config','--libdir'])
+ if ((portid == 'greenplum' and is_rev_gte(dbver_split,
get_rev_num('7.0'))) or
+ (portid == 'postgres' and is_rev_gte(dbver_split,
get_rev_num('13.0')))):
+ libdir = libdir.decode()
+
+ libdir = libdir.strip()+'/postgresql'
+ paths.append(libdir)
paths.append(madlib_library_path)
dynamic_library_path = ':'.join(paths)