Skip to contentSkip to conversation

component-meta: Adding component meta information

PATCH NAK Mahesh Radhakrishnan 2 participants 3 messages Sep 20, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 component-meta: Adding component meta information

Class for adding component meta information

---
 classes/component_meta.bbclass | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 classes/component_meta.bbclass
classes/component_meta.bbclass new file +29 -0
new file mode 100644
index 0000000..f2dc754
@@ -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
Signature · 1 line
1.9.1
#1 lore raw

NAK, this has been discussed in the past...

Quoted 51 lines · Mahesh Radhakrishnan

Class for adding component meta information

---
 classes/component_meta.bbclass | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 classes/component_meta.bbclass
classes/component_meta.bbclass new file +29 -0
new file mode 100644
index 0000000..f2dc754
@@ -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
Signature · 7 lines
1.9.1

-- 
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
#2 lore raw

Hi Denys,
Sorry, I thought I had not pushed the patch earlier, and missed the thread (attached)
I will resolve the name, description & push this to meta-processor-sdk .

Justin,
Can you share the description to the class?
The name is going to be 'comp-install-meta' then?

Regards
Machu.

-----Original Message-----
From: Dmytriyenko, Denys
Sent: Wednesday, September 20, 2017 3:55 PM
To: Radhakrishnan, Mahesh
Cc: [email protected]
Subject: Re: [meta-ti] [PATCH] component-meta: Adding component meta information

NAK, this has been discussed in the past...

Quoted 63 lines · Mahesh Radhakrishnan

Class for adding component meta information

---
 classes/component_meta.bbclass | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 classes/component_meta.bbclass
(quoted diff) +0 -0

b/classes/component_meta.bbclass new file mode 100644 index 0000000..f2dc754

classes/component_meta.bbclass new file +29 -1
@@ -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

--
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti

-----Original Message-----
From: Dmytriyenko, Denys
Sent: Monday, July 17, 2017 7:31 PM
To: Sobota, Justin
Cc: Radhakrishnan, Mahesh; [email protected] - Arago/Yocto/OpenEmbedded/TI-SDK internal support (May contain non- TIers)
Subject: Re: [yocto-support] Re: [meta-ti] [PATCH] component_meta:
Adding component_meta bbclass

Quoted 7 lines

Thanks, Justin,

Couple followup questions:

1. Can we come up with less generic name? Maybe with "install" word in the name? Also would be nice to have some short comment about the class at the beginning of the file.

How about "comp_install_meta"?

I'll add a description to the top of the class.

Quoted 5 lines

2. Can this be added to meta-arago instead? This sounds to me as a distro feature, instead of BSP one. And meta-ti is for BSP recipes and machine configs, while meta-arago is for apps recipes and distro configs.

I'm fine with this. Machu please upstream this to meta-arago after we resolve the naming and I update the class with a description.

Quoted 90 lines

--
Denys

Quoted 3 lines · Justin

Denys,

This class is used by components to generate metadata which is used by

our

Quoted 1 line

InstallBuilder SDK creation scripts to generate the component selection

menu

Quoted 2 lines

in the installer. Down the road there are plans to use the metadata to auto-populate some of the SDK environment setup and makefile scripts

which

Quoted 9 lines

have component versions within them.

Justin

Quoted 5 lines

-----Original Message-----
From: Dmytriyenko, Denys
Sent: Tuesday, July 11, 2017 7:05 PM
To: Radhakrishnan, Mahesh
Cc: [email protected] - Arago/Yocto/OpenEmbedded/TI-SDK

internal

Quoted 2 lines
Quoted 2 lines

support (May contain non-TIers)
Subject: [yocto-support] Re: [meta-ti] [PATCH] component_meta:

Adding

Quoted 41 lines
Quoted 41 lines

component_meta bbclass

-> internal list.

No description - what's this? why is it needed?

Quoted 3 lines · Mahesh Radhakrishnan
---
 classes/component_meta.bbclass | 29

+++++++++++++++++++++++++++++

Quoted 18 lines
 1 file changed, 29 insertions(+)
 create mode 100644 classes/component_meta.bbclass
(quoted diff) +0 -0

b/classes/component_meta.bbclass new file mode 100644 index 0000000..f2dc754

classes/component_meta.bbclass new file +9 -0
@@ -0,0 +1,29 @@
+CM_NAME ?= ""
+CM_VERSION ?= ""
+CM_ROOT_DIR ?= ""
+CM_BINARY ?= ""
+CM_DESCRIPTION ?= ""
+
+do_component_meta() {
+    if [ ! -d "${DEPLOY_DIR_IMAGE}" ]
+    then

classes/component_meta.bbclass line 19

Quoted 10 lines
classes/component_meta.bbclass new file +10 -0
+        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

Quoted 4 lines
Quoted 4 lines

classes/component_meta.bbclass

Quoted 3 lines
classes/component_meta.bbclass new file +3 -0
+    then
+        # Add component meta information
+        echo

"${CM_NAME}|${CM_VERSION}|${CM_ROOT_DIR}|${CM_BINARY}|${CM_

Quoted 17 lines
Quoted 17 lines

DESCRIPTION}" >> \

classes/component_meta.bbclass

Quoted 5 lines
classes/component_meta.bbclass new file +5 -0
+            ${DEPLOY_DIR_IMAGE}/.components_meta
+    fi
+}
+
+do_component_meta[lockfiles] =

"${DEPLOY_DIR_IMAGE}/component_meta.lock"

Quoted 10 lines
classes/component_meta.bbclass new file +2 -1
+
+addtask do_component_meta after do_install before do_package
--

1.9.1

--
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti