aboutsummaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2023-05-07 01:21:18 -0400
committerEli Schwartz <eschwartz@archlinux.org>2023-05-28 18:22:19 -0400
commit5c479d7a13a518c18ccb4dc3b6bdd7bfc2a9bdb5 (patch)
tree207e4deade93d72790b97e7d02961f69a132800d /ci
parentf71ca2825c6be5aa23583831691687a5e2a88d73 (diff)
downloadmeson-5c479d7a13a518c18ccb4dc3b6bdd7bfc2a9bdb5.zip
meson-5c479d7a13a518c18ccb4dc3b6bdd7bfc2a9bdb5.tar.gz
meson-5c479d7a13a518c18ccb4dc3b6bdd7bfc2a9bdb5.tar.bz2
ciimage: fix pathological brokenness in Debian packaging of python
In this case, PEP 668 was created to allow a thing that Debian wanted, which is for `pip install foobar` to not break the system python. This despite the fact that the system python is fine, unless you use sudo pip which is discouraged for separate reasons, and it is in fact quite natural to install additional packages to the user site-packages. It isn't even the job of the operating system to decide whether the user site-packages is broken, whether the operating system gets the answer correct or not -- it is the job of the operating system to decide whether the operating system is broken, and that can be solved by e.g. enforcing a shebang policy for distribution-packaged software, which distros like Fedora do, and mandating not only that python shebangs do not contain `/usr/bin/env`, but that they *do* contain -s. Anyway, this entire kerfuffle is mostly just a bit of pointless interactive churn, but it bites pretty hard for our use case, which is a container image which is fortunately tested before deployment, so instead of failing to deploy because of theoretical conflicts with the base system (we specifically need base system integration...) we fail to deploy because 5 minutes into pulling apt updates at the very beginning, pip refuses point-blank to work. I especially do not know why it is the job of the operating system to throw errors intended for interactive users at people baking "appliance" containers who cannot "break" the system python anyway. Fix this by doing what Debian and Ubuntu should both have done from the beginning, and opting containers out of this questionable feature entirely. Note that CI images may still not actually complete their build/test cycle and be updated, because e.g. LLVM 16 issues tracked by #11642 or glib ASAN issues tracked by #11754.
Diffstat (limited to 'ci')
-rw-r--r--ci/ciimage/common.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/ci/ciimage/common.sh b/ci/ciimage/common.sh
index f6a52ae..6209ef9 100644
--- a/ci/ciimage/common.sh
+++ b/ci/ciimage/common.sh
@@ -39,9 +39,11 @@ dub_fetch() {
}
install_minimal_python_packages() {
+ rm -f /usr/lib/python3.*/EXTERNALLY-MANAGED
python3 -m pip install "${base_python_pkgs[@]}" $*
}
install_python_packages() {
+ rm -f /usr/lib/python3.*/EXTERNALLY-MANAGED
python3 -m pip install "${base_python_pkgs[@]}" "${python_pkgs[@]}" $*
}