]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
ci: Fix precedence between arguments passed to meson
authorAndrea Bolognani <abologna@redhat.com>
Thu, 24 Aug 2023 15:35:53 +0000 (17:35 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 28 Aug 2023 12:21:44 +0000 (14:21 +0200)
Commit 9c9848f955fd merged $MESON_OPTS into $MESON_ARGS, and
while doing so changed their behavior: while until then the
contents of $MESON_ARGS had precedence over those of $MESON_OPTS,
now the opposite is true. Restore the original behavior and
document it.

The argument for merging the two variables in the first place
was that having both present on the meson command line could be
confusing; however, that should no longer be the case now that
we have reasonably extensive comments explaining the role of
each of the variables and how they interact with each other, so
return the meson command line to its original form.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
ci/build.sh

index ed9b1f44733f993df4d8802ed1b78ad108f410f0..0e07b2e59d2d436f8f7100c104064018de130af5 100644 (file)
@@ -12,10 +12,12 @@ export VIR_TEST_DEBUG=1
 # populated either from a GitLab's job configuration or from command line as
 # `$ helper build --meson-configure-args=-Dopt1 -Dopt2` when run in a local
 # containerized environment
+#
+# The contents of $MESON_ARGS (defined locally) should take precedence over
+# those of $MESON_OPTS (defined when the container was built), so they're
+# passed to meson after them
 
-MESON_ARGS="$MESON_ARGS $MESON_OPTS"
-
-meson setup build --werror -Dsystem=true $MESON_ARGS || \
+meson setup build --werror -Dsystem=true $MESON_OPTS $MESON_ARGS || \
 (cat build/meson-logs/meson-log.txt && exit 1)
 
 ninja -C build $NINJA_ARGS