Package yaml files and generated files as part of base class

Change-Id: I6a66dc2fd6d7117f1ac8b085858b911955866814
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/dbus/openpower-dbus-interfaces.bb b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/dbus/openpower-dbus-interfaces.bb
index 7cfbce3..13a1159 100644
--- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/dbus/openpower-dbus-interfaces.bb
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/dbus/openpower-dbus-interfaces.bb
@@ -7,14 +7,11 @@
 inherit autotools pkgconfig
 inherit obmc-phosphor-license
 inherit pythonnative
+inherit phosphor-dbus-yaml
 
 DEPENDS += "autoconf-archive-native"
 DEPENDS += "sdbus++-native"
 
-PACKAGE_BEFORE_PN = "${PN}-yaml"
-
-FILES_${PN}-yaml = "${datadir}/${PN}/yaml"
-
 SRC_URI += "git://github.com/openbmc/openpower-dbus-interfaces"
 SRCREV = "b331f56c416812b20c1a338b3ffdce32d169a0c1"
 
diff --git a/meta-phosphor/classes/phosphor-dbus-yaml.bbclass b/meta-phosphor/classes/phosphor-dbus-yaml.bbclass
new file mode 100644
index 0000000..973c2bd
--- /dev/null
+++ b/meta-phosphor/classes/phosphor-dbus-yaml.bbclass
@@ -0,0 +1,4 @@
+yaml_dir = "${datadir}/phosphor-dbus-yaml/yaml"
+
+PACKAGE_BEFORE_PN += "${PN}-yaml"
+FILES_${PN}-yaml += "${yaml_dir}"
diff --git a/meta-phosphor/classes/phosphor-logging.bbclass b/meta-phosphor/classes/phosphor-logging.bbclass
index 0264b51..18f53d4 100644
--- a/meta-phosphor/classes/phosphor-logging.bbclass
+++ b/meta-phosphor/classes/phosphor-logging.bbclass
@@ -1,2 +1 @@
 callouts_datadir="${datadir}/phosphor-logging/callouts"
-error_yaml_dir = "${datadir}/phosphor-logging/error/yaml"
diff --git a/meta-phosphor/common/recipes-phosphor/dbus/phosphor-dbus-interfaces.bb b/meta-phosphor/common/recipes-phosphor/dbus/phosphor-dbus-interfaces.bb
index 7ee227f..80089b3 100644
--- a/meta-phosphor/common/recipes-phosphor/dbus/phosphor-dbus-interfaces.bb
+++ b/meta-phosphor/common/recipes-phosphor/dbus/phosphor-dbus-interfaces.bb
@@ -7,14 +7,11 @@
 inherit autotools pkgconfig
 inherit obmc-phosphor-license
 inherit pythonnative
+inherit phosphor-dbus-yaml
 
 DEPENDS += "autoconf-archive-native"
 DEPENDS += "sdbus++-native"
 
-PACKAGE_BEFORE_PN = "${PN}-yaml"
-
-FILES_${PN}-yaml = "${datadir}/${PN}/yaml"
-
 SRC_URI += "git://github.com/openbmc/phosphor-dbus-interfaces"
 SRCREV = "7b54884c0460f529efd047c7c5d1d679c9333a29"