From 024f377921dec87507e3b71989b61480c0ea47e8 Mon Sep 17 00:00:00 2001
From: "Dr. Jens Harbott" <harbott@osism.tech>
Date: Tue, 1 Mar 2022 21:10:28 +0100
Subject: [PATCH] Fix ensure-pip test on Debian Buster

Our wheel mirrors contain pluggy-1.0.0-py2.py3-none-any.whl which pip
sees as a sign to install it under py2.7 although the wheel is only
meant for >=py3.6. Add a cap to the test command to install some older
version instead.

Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: I32d2c29988f92124e7dcdf462b2dd07cfd68b4d2
---
 test-playbooks/ensure-pip.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test-playbooks/ensure-pip.yaml b/test-playbooks/ensure-pip.yaml
index 8a09702af..f1fc37fcf 100644
--- a/test-playbooks/ensure-pip.yaml
+++ b/test-playbooks/ensure-pip.yaml
@@ -38,6 +38,7 @@
 
     - name: Test virtualenv
       # NOTE(ianw) 2022-02-03 : not supported on 9-stream, see inline comments
+      # NOTE(frickler) 2022-03-01 : pin pluggy so as to work on Debian Buster
       when: not (ansible_facts['distribution'] == 'CentOS' and  ansible_facts['distribution_major_version']|int >= 9)
       block:
         # ensure-virtualenv
@@ -50,7 +51,7 @@
             tmp_venv=$(mktemp -d -t venv-XXXXXXXXXX)
             trap "rm -rf $tmp_venv" EXIT
             virtualenv $tmp_venv
-            $tmp_venv/bin/pip install tox
+            $tmp_venv/bin/pip install tox "pluggy<1"
           failed_when: false
           register: _virtualenv_sanity