Mender-artifact missing global options support in mender-artifactimg.bbclass

In https://raw.githubusercontent.com/mendersoftware/meta-mender/master/meta-mender-core/classes/mender-artifactimg.bbclass

There doesn’t seem to be any provision to set mender-artifact global options like compression. MENDER_ARTIFACT_EXTRA_ARGS adds command args and cannot be used for global options. Should we provide a MENDER_ARTIFACT_GLOBAL_ARGS variable to support change of compression in yocto builds.

For example:

from this:

mender-artifact write rootfs-image \
    -n ${MENDER_ARTIFACT_NAME} \
    $extra_args \
    $image_flag ${IMGDEPLOYDIR}/${ARTIFACTIMG_NAME}.${ARTIFACTIMG_FSTYPE} \
    ${MENDER_ARTIFACT_EXTRA_ARGS} \
    -o ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.mender

to

mender-artifact ${MENDER_ARTIFACT_GLOBAL_ARGS} write rootfs-image \
    -n ${MENDER_ARTIFACT_NAME} \
    $extra_args \
    $image_flag ${IMGDEPLOYDIR}/${ARTIFACTIMG_NAME}.${ARTIFACTIMG_FSTYPE} \
    ${MENDER_ARTIFACT_EXTRA_ARGS} \
    -o ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.mender

https://tracker.mender.io/browse/MEN-2970

1 Like

I don’t see any issues with adding this. In fact i quite like it.

Still, not me making the final decision, so simply

:+1:

from me.