[v2] imagetypes XZ_OPTIONS replaced by XZ_DEFAULTS defined in bitbake.conf

Message ID 20230210111255.1508053-1-roberto.foglietta@linuxteam.org
State Accepted, archived
Headers show
Series [v2] imagetypes XZ_OPTIONS replaced by XZ_DEFAULTS defined in bitbake.conf | expand

Commit Message

roberto.foglietta@linuxteam.org Feb. 10, 2023, 11:12 a.m. UTC
From: Anton Mikanovich <amikan@ilbers.de>

imagetypes, bugfix

A previous patch moved XZ_ variables declarations into bitbake.conf from
the imagetypes class. In such patch the XZ_OPTIONS has been renamed in
XZ_DEFAULTS but the XZ_ command in imagetype class has not been updated.
This patch fixed this bug which decreases performance and alters the
expected behaviour.

Fixes: 924aa382ca26 ("bitbake.conf: declare default XZ and ZSTD options")

Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
---
 meta/classes/imagetypes.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Uladzimir Bely Feb. 16, 2023, 4:30 a.m. UTC | #1
In the email from Friday, 10 February 2023 14:12:55 +03 user 
roberto.foglietta@linuxteam.org wrote:
> From: Anton Mikanovich <amikan@ilbers.de>
> 
> imagetypes, bugfix
> 
> A previous patch moved XZ_ variables declarations into bitbake.conf from
> the imagetypes class. In such patch the XZ_OPTIONS has been renamed in
> XZ_DEFAULTS but the XZ_ command in imagetype class has not been updated.
> This patch fixed this bug which decreases performance and alters the
> expected behaviour.
> 
> Fixes: 924aa382ca26 ("bitbake.conf: declare default XZ and ZSTD options")
> 
> Signed-off-by: Roberto A. Foglietta <roberto.foglietta@gmail.com>
> ---
>  meta/classes/imagetypes.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/imagetypes.bbclass
> b/meta/classes/imagetypes.bbclass index 0cff440f..7d193d2e 100644
> --- a/meta/classes/imagetypes.bbclass
> +++ b/meta/classes/imagetypes.bbclass
> @@ -98,5 +98,5 @@ IMAGE_CONVERSIONS = "gz xz"
>  CONVERSION_CMD:gz = "${SUDO_CHROOT} sh -c 'gzip -f -9 -n -c --rsyncable
> ${IMAGE_FILE_CHROOT} > ${IMAGE_FILE_CHROOT}.gz'" CONVERSION_DEPS:gz =
> "gzip"
> 
> -CONVERSION_CMD:xz = "${SUDO_CHROOT} sh -c 'xz -c ${XZ_OPTIONS}
> ${IMAGE_FILE_CHROOT} > ${IMAGE_FILE_CHROOT}.xz'" +CONVERSION_CMD:xz =
> "${SUDO_CHROOT} sh -c 'xz -c ${XZ_DEFAULTS} ${IMAGE_FILE_CHROOT} >
> ${IMAGE_FILE_CHROOT}.xz'" CONVERSION_DEPS:xz = "xz-utils"

Applied to next, thanks.

Patch

diff --git a/meta/classes/imagetypes.bbclass b/meta/classes/imagetypes.bbclass
index 0cff440f..7d193d2e 100644
--- a/meta/classes/imagetypes.bbclass
+++ b/meta/classes/imagetypes.bbclass
@@ -98,5 +98,5 @@  IMAGE_CONVERSIONS = "gz xz"
 CONVERSION_CMD:gz = "${SUDO_CHROOT} sh -c 'gzip -f -9 -n -c --rsyncable ${IMAGE_FILE_CHROOT} > ${IMAGE_FILE_CHROOT}.gz'"
 CONVERSION_DEPS:gz = "gzip"
 
-CONVERSION_CMD:xz = "${SUDO_CHROOT} sh -c 'xz -c ${XZ_OPTIONS} ${IMAGE_FILE_CHROOT} > ${IMAGE_FILE_CHROOT}.xz'"
+CONVERSION_CMD:xz = "${SUDO_CHROOT} sh -c 'xz -c ${XZ_DEFAULTS} ${IMAGE_FILE_CHROOT} > ${IMAGE_FILE_CHROOT}.xz'"
 CONVERSION_DEPS:xz = "xz-utils"