aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lcitool/formatters.py6
-rw-r--r--tests/data/formatters/out/libvirt-debian-sid-s390x-cross-aarch64-combined.Dockerfile3
-rw-r--r--tests/data/formatters/out/libvirt-debian-sid-s390x.Dockerfile1
-rw-r--r--tests/data/formatters/out/libvirt-debian-sid-s390x.sh1
4 files changed, 10 insertions, 1 deletions
diff --git a/lcitool/formatters.py b/lcitool/formatters.py
index a6a17e7..ec4b580 100644
--- a/lcitool/formatters.py
+++ b/lcitool/formatters.py
@@ -336,6 +336,12 @@ class BuildEnvFormatter(Formatter):
"{nosync}{packaging_command} clean all -y",
])
+ # If distro forces "pip" to use a venv by default,
+ # then undo that, because our CI env is expected to
+ # have a mix of distro & pip installed pieces
+ if "python3" in varmap["mappings"]:
+ commands.extend(["rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED"])
+
if not target.cross_arch:
commands.extend(self._format_commands_pkglist(target))
commands.extend(self._format_commands_ccache(target, varmap))
diff --git a/tests/data/formatters/out/libvirt-debian-sid-s390x-cross-aarch64-combined.Dockerfile b/tests/data/formatters/out/libvirt-debian-sid-s390x-cross-aarch64-combined.Dockerfile
index 7245416..2c45ad8 100644
--- a/tests/data/formatters/out/libvirt-debian-sid-s390x-cross-aarch64-combined.Dockerfile
+++ b/tests/data/formatters/out/libvirt-debian-sid-s390x-cross-aarch64-combined.Dockerfile
@@ -45,7 +45,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
- dpkg-reconfigure locales
+ dpkg-reconfigure locales && \
+ rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
ENV LANG "en_US.UTF-8"
diff --git a/tests/data/formatters/out/libvirt-debian-sid-s390x.Dockerfile b/tests/data/formatters/out/libvirt-debian-sid-s390x.Dockerfile
index c2bc455..950509d 100644
--- a/tests/data/formatters/out/libvirt-debian-sid-s390x.Dockerfile
+++ b/tests/data/formatters/out/libvirt-debian-sid-s390x.Dockerfile
@@ -81,6 +81,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
eatmydata apt-get autoclean -y && \
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
dpkg-reconfigure locales && \
+ rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED && \
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
mkdir -p /usr/libexec/ccache-wrappers && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
diff --git a/tests/data/formatters/out/libvirt-debian-sid-s390x.sh b/tests/data/formatters/out/libvirt-debian-sid-s390x.sh
index 8eb8b2d..86e44b4 100644
--- a/tests/data/formatters/out/libvirt-debian-sid-s390x.sh
+++ b/tests/data/formatters/out/libvirt-debian-sid-s390x.sh
@@ -77,6 +77,7 @@ function install_buildenv() {
xsltproc
sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen
dpkg-reconfigure locales
+ rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
mkdir -p /usr/libexec/ccache-wrappers
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc