Skip to content

Commit fd50946

Browse files
Merge pull request #1525 from craigcomstock/ENT-12432-3/master
Adjusted installation of psycopg2 for build hosts
2 parents 69b1df5 + f99c39c commit fd50946

1 file changed

Lines changed: 3 additions & 13 deletions

File tree

ci/cfengine-build-host-setup.cf

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ bundle agent cfengine_build_host_setup
99
"assumptions" string => "The operating system has working repository lists and has been updated and upgraded recently.";
1010

1111
packages:
12-
debian_9|debian_10|ubuntu_16::
13-
"python-psycopg2";
14-
debian_11|debian_12|ubuntu_20|ubuntu_22|ubuntu_24::
15-
"python3-psycopg2";
1612
ubuntu_16::
1713
"systemd-coredump" comment => "ubuntu_16 doesn't have systemd-coredump by default?";
1814
ubuntu_20::
@@ -46,6 +42,7 @@ bundle agent cfengine_build_host_setup
4642
"pkg-config";
4743
"psmisc";
4844
"python3-pip";
45+
"python3-psycopg2";
4946
"rsync" comment => "added for debian-10";
5047

5148
ubuntu_16.mingw_build_host:: # for now, only ubu16 hosts mingw builds
@@ -84,10 +81,9 @@ bundle agent cfengine_build_host_setup
8481
"perl-IPC-Cmd";
8582
"perl-devel";
8683
"xfsprogs";
87-
8884
(redhat_6|centos_6).(yum_dnf_conf_ok)::
8985
"python-psycopg2" comment => "centos-6 provides python2 and psycopg2 for python2 as a package";
90-
(redhat_7|centos_7).(yum_dnf_conf_ok)::
86+
!(redhat_6|centos_6).(yum_dnf_conf_ok)::
9187
"python3-psycopg2";
9288

9389
# note that shellcheck, fakeroot and ccache require epel-release to be installed
@@ -110,7 +106,6 @@ bundle agent cfengine_build_host_setup
110106
"which";
111107

112108
(redhat_8|centos_8).(yum_dnf_conf_ok)::
113-
"python2-psycopg2" comment => "This will bring in python2";
114109
"python3-rpm-macros" -> { "provides macro py3_shebang_fix needed in rhel-8 for /var/cfengine/bin/cfbs", "ENT-11338" }
115110
comment => "There are several versions of python(x)-rpm-macros. We choose this one to get platform-python which is guaranteed to be installed in rhel-8.";
116111
"platform-python-devel" -> { "cfbs shebang", "ENT-11338" }
@@ -126,7 +121,6 @@ bundle agent cfengine_build_host_setup
126121

127122
(redhat_9).(yum_dnf_conf_ok)::
128123
"perl-Sys-Hostname" comment => "Needed by __04_examples_outputs_check_outputs_cf";
129-
"python3-psycopg2";
130124

131125
suse|opensuse|sles::
132126
"binutils";
@@ -163,17 +157,13 @@ bundle agent cfengine_build_host_setup
163157
"have_perl_package_installed" expression => returnszero("rpm -q perl >/dev/null", "useshell");
164158
redhat_9::
165159
"have_python3_pip_package_installed" expression => returnszero("rpm -q python3-pip >/dev/null", "useshell");
166-
(redhat_8|centos_8|redhat_9).(yum_conf_ok.dnf_conf_ok)::
160+
!(redhat_6|centos_6|redhat_7|centos_7).(yum_conf_ok.dnf_conf_ok)::
167161
"yum_dnf_conf_ok" expression => "any";
168162
(redhat_6|centos_6|redhat_7|centos_7).(yum_conf_ok)::
169163
"yum_dnf_conf_ok" expression => "any";
170164
(redhat_7|centos_7|redhat_8|centos_8|redhat_9).(yum_dnf_conf_ok)::
171165
"have_development_tools" expression => returnszero("yum groups list installed | grep 'Development Tools' >/dev/null", "useshell"),
172166
comment => "note: centos-7 has installed instead of --installed argument, and that works on rhel-8 and rhel-9 so go with the sub-command instead of option";
173-
ubuntu_20::
174-
"have_python2_pip" expression => fileexists("/usr/local/bin/pip");
175-
ubuntu_20.have_python2_pip::
176-
"have_python2_psycopg2" expression => returnszero("/usr/local/bin/pip list psycopg2", "useshell");
177167

178168
commands:
179169
!have_opt_jdk21.(debian_9|ubuntu_16|redhat_6|centos_6)::

0 commit comments

Comments
 (0)