phosphor-dbus-intefaces: Explicitly disable unused interfaces

It is helpful for CI and subproject workflows to have P-D-I enable
all interfaces by default, but this is typically not what is desired
in installed situations.  Explicitly disable all interfaces by default
except those enabled by OBMC_ORG_YAML_SUBDIRS.

Change-Id: I0023fffe4679f7088f7b102772eaf3247c97f7d3
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-interfaces_git.bb b/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-interfaces_git.bb
index b79966d..df79436 100644
--- a/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-interfaces_git.bb
+++ b/meta-phosphor/recipes-phosphor/dbus/phosphor-dbus-interfaces_git.bb
@@ -28,11 +28,15 @@
                 for x in listvar_to_list(d, 'OBMC_ORG_YAML_SUBDIRS')
         ])
 pdi_meson_config[vardeps] = "OBMC_ORG_YAML_SUBDIRS"
+EXTRA_OEMESON += "${@pdi_meson_config(d)}"
+
+# Remove all schemas by default regardless of the meson_options.txt config
+do_write_config:append() {
+    for intf in $(grep "^option('data_" ${S}/meson_options.txt | sed "s,^.*\(data_[^']*\).*$,\1,"); do
+        sed -i "/^\[built-in options\]\$/a$intf = false" ${WORKDIR}/meson.cross
+    done
+}
 
 # Markdown files are installed into /usr/share/phosphor-dbus-interfaces so
 # add them to the 'doc' subpackage.
 FILES:${PN}-doc += "${datadir}/${BPN}"
-
-EXTRA_OEMESON:append = " \
-        -Db_lto=true \
-        ${@pdi_meson_config(d)}"