The "entrypoint arguments" (command) is allowed to be a list of
arguments to pass to the entrypoint. However, the current
OCI_IMAGE_ENTRYPOINT_ARGS variables doesn't support however. In order to
maintain backward compatibility, a new variable has to be introduced to
that can be split into the multiple arguments required

Signed-off-by: Joshua Watt <[email protected]>
---
 classes/image-oci-umoci.inc | 3 +++
 classes/image-oci.bbclass   | 1 +
 2 files changed, 4 insertions(+)

diff --git a/classes/image-oci-umoci.inc b/classes/image-oci-umoci.inc
index 6c7f244..da93570 100644
--- a/classes/image-oci-umoci.inc
+++ b/classes/image-oci-umoci.inc
@@ -103,6 +103,9 @@ IMAGE_CMD:oci() {
     if [ -n "${OCI_IMAGE_ENTRYPOINT_ARGS}" ]; then
        umoci config --image $image_name:${OCI_IMAGE_TAG} --config.cmd 
"${OCI_IMAGE_ENTRYPOINT_ARGS}"
     fi
+    if [ -n "${OCI_IMAGE_ENTRYPOINT_ARG_LIST}" ]; then
+       umoci config --image $image_name:${OCI_IMAGE_TAG} ${@" 
".join("--config.cmd %s" % s for s in 
d.getVar("OCI_IMAGE_ENTRYPOINT_ARG_LIST").split())}
+    fi
     umoci config --image $image_name:${OCI_IMAGE_TAG} --author 
${OCI_IMAGE_AUTHOR_EMAIL}
 
     # make a tar version of the image direcotry
diff --git a/classes/image-oci.bbclass b/classes/image-oci.bbclass
index 9ddb88b..68045ad 100644
--- a/classes/image-oci.bbclass
+++ b/classes/image-oci.bbclass
@@ -57,6 +57,7 @@ OCI_IMAGE_SUBARCH ?= 
"${@oci_map_subarch(d.getVar('TARGET_ARCH'), d.getVar('TUNE
 
 OCI_IMAGE_ENTRYPOINT ?= "sh"
 OCI_IMAGE_ENTRYPOINT_ARGS ?= ""
+OCI_IMAGE_ENTRYPOINT_ARG_LIST ?=""
 OCI_IMAGE_WORKINGDIR ?= ""
 OCI_IMAGE_STOPSIGNAL ?= ""
 
-- 
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#8353): 
https://lists.yoctoproject.org/g/meta-virtualization/message/8353
Mute This Topic: https://lists.yoctoproject.org/mt/101922305/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to