meta-ibm: witherspoon: inventory: target class recipes
In the near future meta-phosphor will switch phosphor-inventory-manager
over to target class configuration recipes in place of native class
configuration recipes. Configuration recipes populate the
/usr/share/phosphor-inventory filesystem with the YAML configuration
that the phosphor-inventory-manager build process expects.
Those are preferable to native class config recipes because native
recipes cannot be overridden based on MACHINE.
Add a target class recipe for inventory-cleanup so meta-ibm is ready
when meta-phosphor makes the cut-over.
(From meta-ibm rev: 0105129e023c3e310b264a607eaeff41a8ed7ed7)
Change-Id: I58f4a11bf8fb9d7f47ecdd4f73f83581ef507779
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/inventory/inventory-cleanup.bb b/meta-ibm/meta-witherspoon/recipes-phosphor/inventory/inventory-cleanup.bb
new file mode 100644
index 0000000..cdb146c
--- /dev/null
+++ b/meta-ibm/meta-witherspoon/recipes-phosphor/inventory/inventory-cleanup.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Copy Witherspoon inventory cleanup yaml for inventory manager"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${IBMBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
+
+inherit allarch
+inherit phosphor-inventory-manager
+
+S = "${WORKDIR}"
+
+SRC_URI = "file://inventory-cleanup.yaml"
+
+do_install() {
+ install -D inventory-cleanup.yaml ${D}${base_datadir}/events.d/inventory-cleanup.yaml
+}
+
+FILES_${PN} += "${base_datadir}/events.d/inventory-cleanup.yaml"
diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/inventory/phosphor-inventory-manager_%.bbappend b/meta-ibm/meta-witherspoon/recipes-phosphor/inventory/phosphor-inventory-manager_%.bbappend
index 5e3aff4..9b5b948 100644
--- a/meta-ibm/meta-witherspoon/recipes-phosphor/inventory/phosphor-inventory-manager_%.bbappend
+++ b/meta-ibm/meta-witherspoon/recipes-phosphor/inventory/phosphor-inventory-manager_%.bbappend
@@ -2,6 +2,9 @@
PACKAGECONFIG_append = " associations"
SRC_URI += "file://associations.json"
+
+DEPENDS_append_witherspoon = " inventory-cleanup"
+
do_install_append() {
install -d ${D}${base_datadir}
install -m 0755 ${WORKDIR}/associations.json ${D}${base_datadir}/associations.json