summaryrefslogtreecommitdiffstats
path: root/hammer.py
diff options
context:
space:
mode:
authorAndrei Pavel <andrei@isc.org>2022-10-03 09:56:21 +0200
committerAndrei Pavel <andrei@isc.org>2022-10-07 14:08:03 +0200
commit0097c9aafa01fafc1ff19cce9c76ef786e8bb796 (patch)
tree66e389414049b7bf13b511b7b7e937140b4b6674 /hammer.py
parent[#2539] hammer.py: warn if there is no Release file (diff)
downloadkea-0097c9aafa01fafc1ff19cce9c76ef786e8bb796.tar.xz
kea-0097c9aafa01fafc1ff19cce9c76ef786e8bb796.zip
[#2539] hammer.py: defer linking of pg_config until after package is installed
Diffstat (limited to 'hammer.py')
-rwxr-xr-xhammer.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/hammer.py b/hammer.py
index bf2dcebcc5..979529c44e 100755
--- a/hammer.py
+++ b/hammer.py
@@ -1566,8 +1566,10 @@ def prepare_system_local(features, check_times):
packages.extend(['postgresql', 'postgresql-server'])
if revision == '9':
packages.append('postgresql13-devel')
- if not os.path.exists('/usr/bin/pg_config'):
- execute('sudo ln -s /usr/pgsql-13/bin/pg_config /usr/bin/pg_config')
+ def link_pg_config():
+ if not os.path.exists('/usr/bin/pg_config'):
+ execute('sudo ln -s /usr/pgsql-13/bin/pg_config /usr/bin/pg_config')
+ deferred_functions.append(link_pg_config)
else:
packages.append('postgresql-devel')
@@ -1628,8 +1630,10 @@ def prepare_system_local(features, check_times):
packages.extend(['postgresql', 'postgresql-server'])
if revision == '9':
packages.append('postgresql13-devel')
- if not os.path.exists('/usr/bin/pg_config'):
- execute('sudo ln -s /usr/pgsql-13/bin/pg_config /usr/bin/pg_config')
+ def link_pg_config():
+ if not os.path.exists('/usr/bin/pg_config'):
+ execute('sudo ln -s /usr/pgsql-13/bin/pg_config /usr/bin/pg_config')
+ deferred_functions.append(link_pg_config)
else:
packages.append('postgresql-devel')
@@ -2021,8 +2025,6 @@ def _build_binaries_and_run_ut(system, revision, features, tarball_path, env, ch
cmd += ' --with-mysql'
if 'pgsql' in features:
cmd += ' --with-pgsql'
- if system == 'rhel' and revision == '9':
- cmd += '=/usr/pgsql-14/bin/pg_config'
if 'unittest' in features:
# prepare gtest switch - use downloaded gtest sources only if it is not present as native package
if system in ['centos', 'fedora', 'rhel', 'freebsd', 'alpine']: