Browse Source

classes: rename CONTAINER_FORMATS to CONTAINER_IMAGE_FORMATS

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>
Henning Schild 3 years ago
parent
commit
4a18e8ed83

+ 4 - 0
RECIPE-API-CHANGELOG.md

@@ -310,3 +310,7 @@ will still also work, but with deprecation warning shown.
 ### Change default "NAME:TAG" when building container images
 ### Change default "NAME:TAG" when building container images
 
 
 The "NAME" used to be rather static and the TAG was always "latest", now the values are derived from recipe variables PN, PV, PR.
 The "NAME" 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.

+ 4 - 4
doc/user_manual.md

@@ -260,7 +260,7 @@ requirements (e.g. libraries) can be easily resolved in a containerized
 environment.
 environment.
 
 
 Container images can be generated in different formats, selected with the 
 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:
 options can be given:
  - `docker-archive`: (default) an archive containing a Docker image that can 
  - `docker-archive`: (default) an archive containing a Docker image that can 
    be imported with [`docker load`](https://docs.docker.com/engine/reference/commandline/load)
    be imported with [`docker load`](https://docs.docker.com/engine/reference/commandline/load)
@@ -282,7 +282,7 @@ The resulting container image archives (only for `docker-archive` and
 `oci-archive`) are made available as 
 `oci-archive`) are made available as 
 `tmp/deploy/images/${MACHINE}/${DISTRO}-${DISTRO_ARCH}-${container_format}.tar.xz` 
 `tmp/deploy/images/${MACHINE}/${DISTRO}-${DISTRO_ARCH}-${container_format}.tar.xz` 
 (being `container_format` each one of the formats specified in 
 (being `container_format` each one of the formats specified in 
-`CONTAINER_FORMAT`).
+`CONTAINER_IMAGE_FORMATS`).
 
 
 ### Example
 ### Example
 
 
@@ -291,9 +291,9 @@ The resulting container image archives (only for `docker-archive` and
 For one-shot builds (use `local.conf` otherwise):
 For one-shot builds (use `local.conf` otherwise):
 
 
 ```
 ```
-export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE IMAGE_FSTYPES CONTAINER_FORMAT"
+export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE IMAGE_TYPE CONTAINER_IMAGE_FORMATS"
 export IMAGE_FSTYPES="container-img"
 export IMAGE_FSTYPES="container-img"
-export CONTAINER_FORMAT="docker-archive"
+export CONTAINER_IMAGE_FORMATS="docker-archive"
 ```
 ```
 
 
  - Trigger creation of container image from root filesystem
  - Trigger creation of container image from root filesystem

+ 3 - 3
meta/classes/container-img.bbclass

@@ -8,10 +8,10 @@
 
 
 do_container_image[dirs] = "${DEPLOY_DIR_IMAGE}"
 do_container_image[dirs] = "${DEPLOY_DIR_IMAGE}"
 do_container_image[stamp-extra-info] = "${DISTRO}-${MACHINE}"
 do_container_image[stamp-extra-info] = "${DISTRO}-${MACHINE}"
-do_container_image[vardeps] += "CONTAINER_FORMATS"
+do_container_image[vardeps] += "CONTAINER_IMAGE_FORMATS"
 do_container_image(){
 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
 addtask container_image before do_image after do_image_tools

+ 2 - 2
meta/classes/image-container-extension.bbclass

@@ -5,7 +5,7 @@
 #
 #
 # This class extends the image.bbclass for containerizing the root filesystem.
 # This class extends the image.bbclass for containerizing the root filesystem.
 
 
-CONTAINER_FORMATS ?= "docker-archive"
+CONTAINER_IMAGE_FORMATS ?= "docker-archive"
 CONTAINER_IMAGE_NAME ?= "${PN}-${DISTRO}-${DISTRO_ARCH}"
 CONTAINER_IMAGE_NAME ?= "${PN}-${DISTRO}-${DISTRO_ARCH}"
 CONTAINER_IMAGE_TAG ?= "${PV}-${PR}"
 CONTAINER_IMAGE_TAG ?= "${PV}-${PR}"
 
 
@@ -45,7 +45,7 @@ containerize_rootfs() {
 
 
     # convert the OCI container image to the desired format
     # convert the OCI container image to the desired format
     image_name="${container_name_prefix}${CONTAINER_IMAGE_NAME}"
     image_name="${container_name_prefix}${CONTAINER_IMAGE_NAME}"
-    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"
         image_archive="${DEPLOY_DIR_IMAGE}/${image_name}-${tag}-${image_type}.tar"
         bbdebug 1 "Creating container image type: ${image_type}"
         bbdebug 1 "Creating container image type: ${image_type}"
         case "${image_type}" in
         case "${image_type}" in