From 9e4a50bcdf7a275766e4f5c7af012c32bc22128d Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 26 Jul 2022 21:49:48 -0400 Subject: [PATCH] meson: fix broken boolean kwarg Everywhere else that `conf.get('ENABLE_*')` is used as a boolean key for something (for example in if statements) it always checks if == 1, but in this one case it neglects to do so. This is important because conf.get yields the same int that was stored, but if statements require booleans. So does executable's "install" kwarg, at least according to the documentation. In actuality, it accepts all types without sanity checking, then uses python "if bool(var)", so you can actually do `install: 'do not'` and that's treated identical to `true`. This is a type-checking bug which Meson will eventually fix. muon fails on the same code, today. --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 2189abddc77..6bbb2db55d1 100644 --- a/meson.build +++ b/meson.build @@ -2229,7 +2229,7 @@ exe = executable( dependencies : [versiondep, libseccomp], install_rpath : rootpkglibdir, - install : conf.get('ENABLE_ANALYZE')) + install : conf.get('ENABLE_ANALYZE') == 1) public_programs += exe if want_tests != 'false' -- 2.47.3