* [PATCH] component_meta: Adding component_meta bbclass
@ 2017-07-06 16:26 Mahesh Radhakrishnan
0 siblings, 0 replies; only message in thread
From: Mahesh Radhakrishnan @ 2017-07-06 16:26 UTC (permalink / raw)
To: meta-ti
Signed-off-by: Mahesh Radhakrishnan <m-radhakrishnan2@ti.com>
---
classes/component_meta.bbclass | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
create mode 100644 classes/component_meta.bbclass
diff --git a/classes/component_meta.bbclass b/classes/component_meta.bbclass
new file mode 100644
index 0000000..f2dc754
--- /dev/null
+++ b/classes/component_meta.bbclass
@@ -0,0 +1,29 @@
+CM_NAME ?= ""
+CM_VERSION ?= ""
+CM_ROOT_DIR ?= ""
+CM_BINARY ?= ""
+CM_DESCRIPTION ?= ""
+
+do_component_meta() {
+ if [ ! -d "${DEPLOY_DIR_IMAGE}" ]
+ then
+ mkdir -p ${DEPLOY_DIR_IMAGE}
+ fi
+
+ if [ ! -e "${DEPLOY_DIR_IMAGE}/.components_meta" ]
+ then
+ touch ${DEPLOY_DIR_IMAGE}/.components_meta
+ fi
+
+ # Check if component is already documented in .components_meta
+ if ! grep -q "${CM_ROOT_DIR}" ${DEPLOY_DIR_IMAGE}/.components_meta
+ then
+ # Add component meta information
+ echo "${CM_NAME}|${CM_VERSION}|${CM_ROOT_DIR}|${CM_BINARY}|${CM_DESCRIPTION}" >> \
+ ${DEPLOY_DIR_IMAGE}/.components_meta
+ fi
+}
+
+do_component_meta[lockfiles] = "${DEPLOY_DIR_IMAGE}/component_meta.lock"
+
+addtask do_component_meta after do_install before do_package
--
1.9.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-07-06 16:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-06 16:26 [PATCH] component_meta: Adding component_meta bbclass Mahesh Radhakrishnan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.