Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id DD336E00BAD; Thu, 6 Jul 2017 09:27:09 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no * trust * [198.47.27.80 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's * domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Received: from lelnx194.ext.ti.com (lelnx194.ext.ti.com [198.47.27.80]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id A2FA5E00B57 for ; Thu, 6 Jul 2017 09:27:00 -0700 (PDT) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id v66GQxpd023301 for ; Thu, 6 Jul 2017 11:26:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1499358419; bh=cuPatFtyC/9j1k0U8bQc+Dh69y1/aKvltNnFBo+lU/w=; h=From:To:CC:Subject:Date; b=Hsn2AgLNVuIJwWJTuD7rAVQ3+j+rxvOtuSDheHFXz1FmJr/JFoM5LROMyixTZSxjh qFRhpbgQpaZhUJ4wsghDf8//wzn1G7Y1GSP9Cx0Gxet6GXFORIo383Vwq5mkf2ajvD YtQML6rcpQMfaSD8GZCxUVRkSKENFozGJcBcQLnQ= Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v66GQxoJ010104 for ; Thu, 6 Jul 2017 11:26:59 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.294.0; Thu, 6 Jul 2017 11:26:59 -0500 Received: from uda0875154a.am.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v66GQxYI029954; Thu, 6 Jul 2017 11:26:59 -0500 From: Mahesh Radhakrishnan To: Date: Thu, 6 Jul 2017 12:26:57 -0400 Message-ID: <1499358417-34903-1-git-send-email-m-radhakrishnan2@ti.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Subject: [PATCH] component_meta: Adding component_meta bbclass X-BeenThere: meta-ti@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-ti layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2017 16:27:09 -0000 Content-Type: text/plain Signed-off-by: Mahesh Radhakrishnan --- 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