Tell phosphor-logging about the sw-mgr error yaml

This needs to be done so phosphor-logging will know to grab
the error log's metadata from the journal and add it to
the log in the AdditionalData field.

Tested: Check that the errors now show up in the elog-lookup.cpp
        file generated during the build by phosphor-logging.

Change-Id: I59e357986ac56ea752c9f7241a5138eb4985ceb6
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/common/recipes-phosphor/flash/phosphor-logging-error-logs-native.bbappend b/common/recipes-phosphor/flash/phosphor-logging-error-logs-native.bbappend
new file mode 100644
index 0000000..beb70b0
--- /dev/null
+++ b/common/recipes-phosphor/flash/phosphor-logging-error-logs-native.bbappend
@@ -0,0 +1 @@
+DEPENDS += "phosphor-software-manager-error-native"
diff --git a/common/recipes-phosphor/flash/phosphor-software-manager-error-native.bb b/common/recipes-phosphor/flash/phosphor-software-manager-error-native.bb
new file mode 100644
index 0000000..bf55058
--- /dev/null
+++ b/common/recipes-phosphor/flash/phosphor-software-manager-error-native.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Copy error yaml files to known path for elog parsing"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${PHOSPHORBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
+
+inherit native
+inherit phosphor-dbus-yaml
+
+require phosphor-software-manager.inc
+
+S = "${WORKDIR}/git"
+
+do_install_append() {
+    SRC=${S}/xyz/openbmc_project/Software/
+    DEST=${D}${yaml_dir}/xyz/openbmc_project/Software/
+    install -d ${DEST}
+    install ${SRC}/*.errors.yaml ${DEST}
+    install ${SRC}/*.metadata.yaml ${DEST}
+}
diff --git a/common/recipes-phosphor/flash/phosphor-software-manager.bb b/common/recipes-phosphor/flash/phosphor-software-manager.bb
index e23e893..5527706 100644
--- a/common/recipes-phosphor/flash/phosphor-software-manager.bb
+++ b/common/recipes-phosphor/flash/phosphor-software-manager.bb
@@ -2,10 +2,9 @@
 DESCRIPTION = "Phosphor Software Manager provides a set of system software \
 management daemons. It is suitable for use on a wide variety of OpenBMC \
 platforms."
-HOMEPAGE = "https://github.com/openbmc/phosphor-bmc-code-mgmt"
 PR = "r1"
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+require ${PN}.inc
 
 SOFTWARE_MGR_PACKAGES = " \
     ${PN}-version \
@@ -86,7 +85,4 @@
     fi
 }
 
-SRC_URI += "git://github.com/openbmc/phosphor-bmc-code-mgmt"
-SRCREV = "56aaf454adef04bd4c1d45870cd86dc2de0a880a"
-
 S = "${WORKDIR}/git"
diff --git a/common/recipes-phosphor/flash/phosphor-software-manager.inc b/common/recipes-phosphor/flash/phosphor-software-manager.inc
new file mode 100644
index 0000000..ef0bdf8
--- /dev/null
+++ b/common/recipes-phosphor/flash/phosphor-software-manager.inc
@@ -0,0 +1,5 @@
+HOMEPAGE = "https://github.com/openbmc/phosphor-bmc-code-mgmt"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+SRC_URI += "git://github.com/openbmc/phosphor-bmc-code-mgmt"
+SRCREV = "56aaf454adef04bd4c1d45870cd86dc2de0a880a"