Skip to content

Commit d4c9536

Browse files
eli-schwartzthesamesam
authored andcommitted
ci: gentoo: make vala tests actually run
Gentoo does a weirdo thing where you cannot detect vala without setting an environment variable. It's usually only set in ebuild recipes, and vala simply does not work on Gentoo at all, period, end of story, outside of that. Capitulate, and parse the output of portage to find the most recent vala installed and export that directly into meson's binary table lookup. We aren't interested in whether *Gentoo* works with Vala, we are interested in finding out whether newly packaged vala versions in Gentoo are compatible with meson. Bug: https://bugs.gentoo.org/513658
1 parent 76cec64 commit d4c9536

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎ci/ciimage/gentoo/install.sh‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,15 @@ python3 -m pip install "${base_python_pkgs[@]}"
165165

166166
echo "source /etc/profile" >> /ci/env_vars.sh
167167

168+
# For inexplicable reasons, Gentoo only packages valac as valac-$(version) so
169+
# no software can locate it. Parse the installed version out of portage and
170+
# export it to meson.
171+
VALA_VER=$(portageq best_version / dev-lang/vala)
172+
VALA_VER=${VALA_VER#dev-lang/vala-}
173+
VALA_VER=${VALA_VER%.*}
174+
echo "export VALAC=/usr/bin/valac-${VALA_VER}" >> /ci/env_vars.sh
175+
echo "export VAPIGEN=/usr/bin/vapigen-${VALA_VER}" >> /ci/env_vars.sh
176+
168177
# Cleanup to avoid including large contents in the docker image.
169178
# We don't need cache files that are side artifacts of installing packages.
170179
# We also don't need the gentoo tree -- the official docker image doesn't

0 commit comments

Comments
 (0)