From 4dc98218a54cc8012cc8c449015bf4ffd165a164 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= Date: Tue, 17 Sep 2024 12:51:10 +0200 Subject: [PATCH] Drop the python version of libdnf into /osb/libdnf-python-version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For more information, see https://github.com/osbuild/osbuild/pull/1818/files#r1761605909 Signed-off-by: Tomáš Hozza --- src/images/osbuild-ci.Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/images/osbuild-ci.Dockerfile b/src/images/osbuild-ci.Dockerfile index 360b658..f76fc66 100644 --- a/src/images/osbuild-ci.Dockerfile +++ b/src/images/osbuild-ci.Dockerfile @@ -59,5 +59,13 @@ RUN git config --global --add safe.directory '*' FROM scratch COPY --from=target . . +# +# Drop the python version for which the python3-dnf package was installed. +# This is then used in osbuild tests to enable site-packages in the tox +# environment, when testing using the same python version. +# + +RUN rpm -ql python3-dnf | grep -E '/usr/lib/python.*/site-packages/dnf/' | cut -d '/' -f 4 | uniq | sed -E 's/python([0-9])\.([0-9]+)/py\1\2/' | tee /osb/libdnf-python-version + WORKDIR /osb/workdir ENTRYPOINT ["/osb/osbuild-ci.sh"]