From c3407d456a8bb3316a923d6bddcd66b879b457f3 Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Sat, 31 Aug 2024 18:48:43 +0300
Subject: [PATCH] Workbench: Force the Python packaging version.

An older version than the one in Debian is being required and the Debian
version is being uninstalled. Removing the Debian package will remove
gyp and npm. The Python uninstallation fails so let's try to force the
version in Debian instead.
---
 workbench/Dockerfile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/workbench/Dockerfile b/workbench/Dockerfile
index 7db7595..7bb959e 100644
--- a/workbench/Dockerfile
+++ b/workbench/Dockerfile
@@ -172,7 +172,9 @@ RUN apt-get update && \
 ENV PIPX_HOME /opt/pipx
 ENV PIPX_BIN_DIR /opt/pipx/bin
 # hadolint ignore=DL3013
-RUN python3 -m pip install --no-cache-dir --break-system-packages \
+RUN export PIP_CONSTRAINT=/tmp/constraint.txt && \
+    echo 'packaging==24.1' >> "$PIP_CONSTRAINT" && \
+    python3 -m pip install --no-cache-dir --break-system-packages \
         Glances \
         PyGObject \
         PyMySQL \
-- 
GitLab