public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: isar-users@googlegroups.com
Cc: Silvano Cirujano Cuesta <silvano.cirujano-cuesta@siemens.com>,
	Henning Schild <henning.schild@siemens.com>
Subject: [PATCH v4 4/5] classes: rename CONTAINER_FORMATS to CONTAINER_IMAGE_FORMATS
Date: Thu,  5 Aug 2021 17:57:20 +0200	[thread overview]
Message-ID: <20210805155721.11872-5-henning.schild@siemens.com> (raw)
In-Reply-To: <20210805155721.11872-1-henning.schild@siemens.com>

This brings some consistency with other image-classes, that image class
variables are prefixed with that class.

Also fix the docs (where the trailing S was missing), and mention the
interface break in our changelog.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 RECIPE-API-CHANGELOG.md                        | 4 ++++
 doc/user_manual.md                             | 8 ++++----
 meta/classes/container-img.bbclass             | 6 +++---
 meta/classes/image-container-extension.bbclass | 4 ++--
 4 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md
index a698eafc8843..d60588e55e7e 100644
--- a/RECIPE-API-CHANGELOG.md
+++ b/RECIPE-API-CHANGELOG.md
@@ -296,3 +296,7 @@ not changed (uncompressed executable) but now it is named correctly.
 ### Change default "TARGET_IMAGE:TAG" when building container images
 
 The "TARGET_IMAGE" used to be rather static and the TAG was always "latest", now the values are derived from recipe variables PN, PV, PR.
+
+### Renamed variable CONTAINER_FORMATS to CONTAINER_IMAGE_FORMATS
+
+The meaning remains the same, just the name changed.
diff --git a/doc/user_manual.md b/doc/user_manual.md
index e5c07bd41fc5..e000a71d47f7 100644
--- a/doc/user_manual.md
+++ b/doc/user_manual.md
@@ -255,7 +255,7 @@ requirements (e.g. libraries) can be easily resolved in a containerized
 environment.
 
 Container images can be generated in different formats, selected with the 
-variable `CONTAINER_FORMAT`. One or more (whitespace separated) of following 
+variable `CONTAINER_IMAGE_FORMATS`. One or more (whitespace separated) of following 
 options can be given:
  - `docker-archive`: (default) an archive containing a Docker image that can 
    be imported with [`docker load`](https://docs.docker.com/engine/reference/commandline/load)
@@ -277,7 +277,7 @@ The resulting container image archives (only for `docker-archive` and
 `oci-archive`) are made available as 
 `tmp/deploy/images/${MACHINE}/${DISTRO}-${DISTRO_ARCH}-${container_format}.tar.xz` 
 (being `container_format` each one of the formats specified in 
-`CONTAINER_FORMAT`).
+`CONTAINER_IMAGE_FORMATS`).
 
 ### Example
 
@@ -286,9 +286,9 @@ The resulting container image archives (only for `docker-archive` and
 For one-shot builds (use `local.conf` otherwise):
 
 ```
-export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE IMAGE_TYPE CONTAINER_FORMAT"
+export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE IMAGE_TYPE CONTAINER_IMAGE_FORMATS"
 export IMAGE_TYPE="container-img"
-export CONTAINER_FORMAT="docker-archive"
+export CONTAINER_IMAGE_FORMATS="docker-archive"
 ```
 
  - Trigger creation of container image from root filesystem
diff --git a/meta/classes/container-img.bbclass b/meta/classes/container-img.bbclass
index 9928a58ef53d..174502ddca7a 100644
--- a/meta/classes/container-img.bbclass
+++ b/meta/classes/container-img.bbclass
@@ -7,10 +7,10 @@
 # to create container images containing the target rootfs.
 
 do_container_image[stamp-extra-info] = "${DISTRO}-${MACHINE}"
-do_container_image[vardeps] += "CONTAINER_FORMATS"
+do_container_image[vardeps] += "CONTAINER_IMAGE_FORMATS"
 do_container_image(){
-    bbdebug 1 "Generate container image in these formats: ${CONTAINER_FORMATS}"
-    containerize_rootfs "${IMAGE_ROOTFS}" "${CONTAINER_FORMATS}"
+    bbdebug 1 "Generate container image in these formats: ${CONTAINER_IMAGE_FORMATS}"
+    containerize_rootfs "${IMAGE_ROOTFS}" "${CONTAINER_IMAGE_FORMATS}"
 }
 
 addtask container_image before do_image after do_image_tools
diff --git a/meta/classes/image-container-extension.bbclass b/meta/classes/image-container-extension.bbclass
index cfbc5f2f3786..8040a991f280 100644
--- a/meta/classes/image-container-extension.bbclass
+++ b/meta/classes/image-container-extension.bbclass
@@ -5,7 +5,7 @@
 #
 # This class extends the image.bbclass for containerizing the root filesystem.
 
-CONTAINER_FORMATS ?= "docker-archive"
+CONTAINER_IMAGE_FORMATS ?= "docker-archive"
 CONTAINER_IMAGE_TARGET_IMAGE ?= "${PN}-${DISTRO}-${DISTRO_ARCH}"
 CONTAINER_IMAGE_TAG ?= "${PV}-${PR}"
 
@@ -44,7 +44,7 @@ containerize_rootfs() {
 
     # convert the OCI container image to the desired format
     image_name="${CONTAINER_IMAGE_TARGET_IMAGE}"
-    for image_type in ${CONTAINER_FORMATS} ; do
+    for image_type in ${CONTAINER_IMAGE_FORMATS} ; do
         image_archive="${DEPLOY_DIR_IMAGE}/${image_name}-${tag}-${image_type}.tar"
         bbdebug 1 "Creating container image type: ${image_type}"
         case "${image_type}" in
-- 
2.31.1


  parent reply	other threads:[~2021-08-05 15:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-05 15:57 [PATCH v4 0/5] Allow better control over container tags Henning Schild
2021-08-05 15:57 ` [PATCH v4 1/5] classes: make sure container extension can run multiple times Henning Schild
2021-08-05 15:57 ` [PATCH v4 2/5] classes: simplify tag handling in container class Henning Schild
2021-08-05 15:57 ` [PATCH v4 3/5] classes: allow more control over container image name and tag Henning Schild
2021-08-05 15:57 ` Henning Schild [this message]
2021-08-05 15:57 ` [PATCH v4 5/5] classes: fix comment in container-img class Henning Schild

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210805155721.11872-5-henning.schild@siemens.com \
    --to=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=silvano.cirujano-cuesta@siemens.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox