aboutsummaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz93@gmail.com>2024-02-09 16:13:18 -0500
committerEli Schwartz <eschwartz93@gmail.com>2024-02-09 16:19:27 -0500
commit3c7bc8cac3737796ef2ee1ce0ba6dd601f5f080b (patch)
treed84484a19957c240d13bb3e71f2ed45b544a06c6 /ci
parentc166b136a60e17d7d76916550d61de55ee6e62e2 (diff)
downloadmeson-3c7bc8cac3737796ef2ee1ce0ba6dd601f5f080b.zip
meson-3c7bc8cac3737796ef2ee1ce0ba6dd601f5f080b.tar.gz
meson-3c7bc8cac3737796ef2ee1ce0ba6dd601f5f080b.tar.bz2
CI image builder: fix profile loading for gentoo
We need to load various environment variables from /etc/profile. We cannot unconditionally load it, because opensuse sources env_vars and their /etc/profile has a fatal bug in it that causes it to return nonzero and abort under `set -e` (which is *amazing* as a thing to have in /etc/profile specifically -- just saying). Alas, even /etc/profile.env is not enough since Java support depends on profile.d logic. Re-conditionalize this check to only be added to env_vars.sh for the image named "gentoo".
Diffstat (limited to 'ci')
-rwxr-xr-xci/ciimage/build.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/ci/ciimage/build.py b/ci/ciimage/build.py
index 10fd099..b355c47 100755
--- a/ci/ciimage/build.py
+++ b/ci/ciimage/build.py
@@ -78,12 +78,13 @@ class Builder(BuilderBase):
if [ -f "$HOME/.cargo/env" ]; then
source "$HOME/.cargo/env"
fi
-
- if [ -f /etc/profile.env ]; then
- source /etc/profile.env
- fi
'''
+ if self.data_dir.name == 'gentoo':
+ out_data += '''
+ source /etc/profile
+ '''
+
out_file.write_text(out_data, encoding='utf-8')
# make it executable