remove mgmt packagegroups

These packagegroups are an unnecessary level of indirection.

Prior, the image feature was implemented by a packagegroup.  The
packagegroup was defined to pull in a virtual.  The virtual could
then be either a single package or another packagegroup.

Just implement the feature with the virtual directly to avoid
nonsensical situations like:
feature <- pkggroup <- virtual <- pkggroup.

Change-Id: I055257b6b646c82764849d49fdad7c10263e3aa3
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/classes/obmc-phosphor-image.bbclass b/classes/obmc-phosphor-image.bbclass
index 8d0ee9f..d367776 100644
--- a/classes/obmc-phosphor-image.bbclass
+++ b/classes/obmc-phosphor-image.bbclass
@@ -12,24 +12,25 @@
 
 inherit core-image
 inherit obmc-phosphor-license
+inherit obmc-phosphor-utils
 
-FEATURE_PACKAGES_obmc-phosphor-fan-mgmt ?= "packagegroup-obmc-phosphor-apps-fan-mgmt"
-FEATURE_PACKAGES_obmc-phosphor-chassis-mgmt ?= "packagegroup-obmc-phosphor-apps-chassis-mgmt"
-FEATURE_PACKAGES_obmc-phosphor-sensor-mgmt ?= "packagegroup-obmc-phosphor-apps-sensor-mgmt"
-FEATURE_PACKAGES_obmc-phosphor-flash-mgmt ?= "packagegroup-obmc-phosphor-apps-flash-mgmt"
-FEATURE_PACKAGES_obmc-phosphor-event-mgmt ?= "packagegroup-obmc-phosphor-apps-event-mgmt"
-FEATURE_PACKAGES_obmc-phosphor-user-mgmt ?= "packagegroup-obmc-phosphor-apps-user-mgmt"
-FEATURE_PACKAGES_obmc-phosphor-system-mgmt ?= "packagegroup-obmc-phosphor-apps-system-mgmt"
+FEATURE_PACKAGES_obmc-fan-mgmt ?= "${@cf_enabled('obmc-phosphor-fan-mgmt', 'virtual-obmc-fan-mgmt', d)}"
+FEATURE_PACKAGES_obmc-chassis-mgmt ?= "${@cf_enabled('obmc-phosphor-chassis-mgmt', 'virtual-obmc-chassis-mgmt', d)}"
+FEATURE_PACKAGES_obmc-sensor-mgmt ?= "${@cf_enabled('obmc-phosphor-sensor-mgmt', 'virtual-obmc-sensor-mgmt', d)}"
+FEATURE_PACKAGES_obmc-flash-mgmt ?= "${@cf_enabled('obmc-phosphor-flash-mgmt', 'virtual-obmc-flash-mgmt', d)}"
+FEATURE_PACKAGES_obmc-event-mgmt ?= "${@df_enabled('obmc-phosphor-event-mgmt', 'virtual-obmc-event-mgmt', d)}"
+FEATURE_PACKAGES_obmc-user-mgmt ?= "${@df_enabled('obmc-phosphor-user-mgmt', 'virtual-obmc-user-mgmt', d)}"
+FEATURE_PACKAGES_obmc-system-mgmt ?= "${@df_enabled('obmc-phosphor-system-mgmt', 'virtual-obmc-system-mgmt', d)}"
 
 # Install entire Phosphor application stack by default
 IMAGE_FEATURES += " \
-        obmc-phosphor-fan-mgmt \
-        obmc-phosphor-chassis-mgmt \
-        obmc-phosphor-sensor-mgmt \
-        obmc-phosphor-flash-mgmt \
-        obmc-phosphor-event-mgmt \
-        obmc-phosphor-user-mgmt \
-        obmc-phosphor-system-mgmt \
+        obmc-fan-mgmt \
+        obmc-chassis-mgmt \
+        obmc-sensor-mgmt \
+        obmc-flash-mgmt \
+        obmc-event-mgmt \
+        obmc-user-mgmt \
+        obmc-system-mgmt \
         ssh-server-dropbear \
         "
 
diff --git a/common/recipes-phosphor/packagegroups/packagegroup-obmc-phosphor-apps.bb b/common/recipes-phosphor/packagegroups/packagegroup-obmc-phosphor-apps.bb
index 183db43..6770ad0 100644
--- a/common/recipes-phosphor/packagegroups/packagegroup-obmc-phosphor-apps.bb
+++ b/common/recipes-phosphor/packagegroups/packagegroup-obmc-phosphor-apps.bb
@@ -7,66 +7,17 @@
 
 PROVIDES = "${PACKAGES}"
 PACKAGES = " \
-        packagegroup-obmc-phosphor-apps-extras \
-        packagegroup-obmc-phosphor-apps-extrasdev \
-        ${@cf_enabled("obmc-phosphor-fan-mgmt", "packagegroup-obmc-phosphor-apps-fan-mgmt", d)} \
-        ${@cf_enabled("obmc-phosphor-chassis-mgmt", "packagegroup-obmc-phosphor-apps-chassis-mgmt", d)} \
-        ${@cf_enabled("obmc-phosphor-sensor-mgmt", "packagegroup-obmc-phosphor-apps-sensor-mgmt", d)} \
-        ${@cf_enabled("obmc-phosphor-flash-mgmt", "packagegroup-obmc-phosphor-apps-flash-mgmt", d)} \
-        ${@df_enabled("obmc-phosphor-event-mgmt", "packagegroup-obmc-phosphor-apps-event-mgmt", d)} \
-        ${@df_enabled("obmc-phosphor-user-mgmt", "packagegroup-obmc-phosphor-apps-user-mgmt", d)} \
-        ${@df_enabled("obmc-phosphor-system-mgmt", "packagegroup-obmc-phosphor-apps-system-mgmt", d)} \
+        ${PN}-extras \
+        ${PN}-extrasdev \
         "
 
-SUMMARY_packagegroup-obmc-phosphor-apps-extras = "Extra features"
-RDEPENDS_packagegroup-obmc-phosphor-apps-extras = " \
+SUMMARY_${PN}-extras = "Extra features"
+RDEPENDS_${PN}-extras = " \
 	phosphor-rest \
         host-ipmid \
         "
 
-SUMMARY_packagegroup-obmc-phosphor-apps-extrasdev = "Development features"
-RDEPENDS_packagegroup-obmc-phosphor-apps-extrasdev = " \
+SUMMARY_${PN}-extrasdev = "Development features"
+RDEPENDS_${PN}-extrasdev = " \
         rest-dbus \
         "
-
-SUMMARY_packagegroup-obmc-phosphor-apps-fan-mgmt = "Fan management support"
-RDEPENDS_packagegroup-obmc-phosphor-apps-fan-mgmt = \
-        "${@cf_enabled("obmc-phosphor-fan-mgmt", " \
-                virtual-obmc-fan-mgmt \
-        ", d)}"
-
-SUMMARY_packagegroup-obmc-phosphor-apps-chassis-mgmt = "Chassis management support"
-RDEPENDS_packagegroup-obmc-phosphor-apps-chassis-mgmt = "\
-        ${@cf_enabled("obmc-phosphor-chassis-mgmt", " \
-                virtual-obmc-chassis-mgmt \
-        ", d)}"
-
-SUMMARY_packagegroup-obmc-phosphor-apps-sensor-mgmt = "Sensor management support"
-RDEPENDS_packagegroup-obmc-phosphor-apps-sensor-mgmt = "\
-        ${@cf_enabled("obmc-phosphor-sensor-mgmt", " \
-                virtual-obmc-sensor-mgmt \
-        ", d)}"
-
-SUMMARY_packagegroup-obmc-phosphor-apps-flash-mgmt = "Flash management support"
-RDEPENDS_packagegroup-obmc-phosphor-apps-flash-mgmt = "\
-        ${@cf_enabled("obmc-phosphor-flash-mgmt", " \
-                virtual-obmc-flash-mgmt \
-        ", d)}"
-
-SUMMARY_packagegroup-obmc-phosphor-apps-event-mgmt = "Event management support"
-RDEPENDS_packagegroup-obmc-phosphor-apps-event-mgmt = " \
-        ${@df_enabled("obmc-phosphor-event-mgmt", " \
-                virtual-obmc-event-mgmt \
-        ", d)}"
-
-SUMMARY_packagegroup-obmc-phosphor-apps-user-mgmt = "User management support"
-RDEPENDS_packagegroup-obmc-phosphor-apps-user-mgmt = " \
-        ${@df_enabled("obmc-phosphor-user-mgmt", " \
-                virtual-obmc-user-mgmt \
-        ", d)}"
-
-SUMMARY_packagegroup-obmc-phosphor-apps-system-mgmt = "System management support"
-RDEPENDS_packagegroup-obmc-phosphor-apps-system-mgmt = " \
-        ${@df_enabled("obmc-phosphor-system-mgmt", " \
-                virtual-obmc-system-mgmt \
-        ", d)}"