From 2a1ce2b6195663b7b44c6aff0bd21ff319133b91 Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Tue, 16 Jan 2024 16:53:02 -0600 Subject: [PATCH] debian-11, if pip2 already there, dont try and install --- cfengine-ci/cfengine-ci-buildhost.cf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cfengine-ci/cfengine-ci-buildhost.cf b/cfengine-ci/cfengine-ci-buildhost.cf index 3320702..b930bc8 100644 --- a/cfengine-ci/cfengine-ci-buildhost.cf +++ b/cfengine-ci/cfengine-ci-buildhost.cf @@ -43,8 +43,11 @@ bundle agent cfengine_ci_buildhost "python3-pip"; "rsync"; # added for debian-10 - commands: + classes: debian_11:: + "have_pip2" expression => fileexists("/usr/local/bin/pip"); + commands: + debian_11.!have_pip2:: "wget https://bootstrap.pypa.io/pip/2.7/get-pip.py -O get-pip.py && python2 get-pip.py && pip install psycopg2-binary" contain => in_shell; ubuntu_16:: # mingw host