From: Eli Schwartz Date: Wed, 27 Jul 2022 01:49:48 +0000 (-0400) Subject: meson: fix broken boolean kwarg X-Git-Tag: v252-rc1~559^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F24154%2Fhead;p=thirdparty%2Fsystemd.git 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. --- 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'