Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/2] classes: Introduce intermediate-deploy.bbclass
@ 2021-01-14  8:06 Diego Sueiro
  2021-01-14  8:06 ` [PATCH 2/2] u-boot: Use intermediate-deploy.bbclass to share artifacts Diego Sueiro
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Diego Sueiro @ 2021-01-14  8:06 UTC (permalink / raw)
  To: openembedded-core; +Cc: richard.purdie, Diego Sueiro

The intermediate-deploy class is to be inherited by recipes that
install intermediate artifacts which are not present in the filesystem
to be further processed by other recipes.

The INTERMEDIATE_DEPLOY_DIRS variable is a space separated list of dirnames
from ${D} which include the intermediate artifacts.

Change-Id: I314987587c1cf0e4cdb28fbf11463f1feb37504b
---
 meta/classes/intermediate-deploy.bbclass | 25 ++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 meta/classes/intermediate-deploy.bbclass

diff --git a/meta/classes/intermediate-deploy.bbclass b/meta/classes/intermediate-deploy.bbclass
new file mode 100644
index 0000000000..4b53ffbf0f
--- /dev/null
+++ b/meta/classes/intermediate-deploy.bbclass
@@ -0,0 +1,25 @@
+# This class is to be inherited by recipes that install intermediate artifacts
+# which are not present in the filesystem to be further processed by other
+# recipes
+
+# Space separated list of dirnames from ${D}
+INTERMEDIATE_DEPLOY_DIRS ?= ""
+do_populate_sysroot[vardeps] += "${INTERMEDIATE_DEPLOY_DIRS}"
+
+SYSROOT_PREPROCESS_FUNCS += "copy_to_intermediate_deploy_sysroot"
+
+copy_to_intermediate_deploy_sysroot() {
+    if [ -n "${INTERMEDIATE_DEPLOY_DIRS}" ]; then
+        dest="${SYSROOT_DESTDIR}/intermediate-deploy"
+        mkdir -p "$dest"
+
+        for dir in ${INTERMEDIATE_DEPLOY_DIRS}; do
+            dir="${dir%/}"
+            dir="${dir#/}"
+            src="${D}/${dir}"
+            if [ -d "$src" ]; then
+                cp -a "$src" "$dest"
+            fi
+        done
+    fi
+}
--
2.17.1

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-01-14 15:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-14  8:06 [PATCH 1/2] classes: Introduce intermediate-deploy.bbclass Diego Sueiro
2021-01-14  8:06 ` [PATCH 2/2] u-boot: Use intermediate-deploy.bbclass to share artifacts Diego Sueiro
2021-01-14 11:56 ` [OE-core] [PATCH 1/2] classes: Introduce intermediate-deploy.bbclass Otavio Salvador
2021-01-14 12:45   ` Diego Sueiro
2021-01-14 15:32     ` Christopher Larson
2021-01-14 12:04 ` Richard Purdie
2021-01-14 13:06   ` [OE-core] " Diego Sueiro
2021-01-14 13:27     ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox