image-artifact-names: make variables overridable
PATCH 1/1 image-artifact-names: make variables overridable
From: Jens Rehsack <[email protected]>
Since the newly introduced image-artifact-names class is inherited at later processing stage, individual IMAGE_NAME settings are overridden (hopefully by accident instead on purpose).
Allow derived distributions define their own name schema by setting defaults iwth question mark.
--- meta/classes/image-artifact-names.bbclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
meta/classes/image-artifact-names.bbclass +4 -4
@@ -2,11 +2,11 @@ # Specific image creation and rootfs population info. ################################################################## -IMAGE_BASENAME = "${PN}" -IMAGE_VERSION_SUFFIX = "-${DATETIME}" +IMAGE_BASENAME ?= "${PN}" +IMAGE_VERSION_SUFFIX ?= "-${DATETIME}" IMAGE_VERSION_SUFFIX[vardepsexclude] += "DATETIME" -IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}${IMAGE_VERSION_SUFFIX}" -IMAGE_LINK_NAME = "${IMAGE_BASENAME}-${MACHINE}" +IMAGE_NAME ?= "${IMAGE_BASENAME}-${MACHINE}${IMAGE_VERSION_SUFFIX}" +IMAGE_LINK_NAME ?= "${IMAGE_BASENAME}-${MACHINE}" # IMAGE_NAME is the base name for everything produced when building images. # The actual image that contains the rootfs has an additional suffix (.rootfs
Signature · 1 line
2.17.1
Quoted 5 lines · Jens Rehsack
From: Jens Rehsack <[email protected]>
Since the newly introduced image-artifact-names class is inherited at later processing stage, individual
IMAGE_NAMEsettings are overridden (hopefully by accident instead on purpose).
The purpose was was to make it easier for DISTRO to define own scheme, so LGTM.
You can still override the values from distro layer, but I agree that this makes it a bit easier to do that, thanks!
Quoted 31 lines
Allow derived distributions define their own name schema by setting defaults iwth question mark.
Signed-off-by Jens Rehsack <[email protected]>--- meta/classes/image-artifact-names.bbclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)meta/classes/image-artifact-names.bbclass +4
-4@@ -2,11 +2,11 @@ # Specific image creation and rootfs population info. ################################################################## -IMAGE_BASENAME = "${PN}" -IMAGE_VERSION_SUFFIX = "-${DATETIME}" +IMAGE_BASENAME ?= "${PN}" +IMAGE_VERSION_SUFFIX ?= "-${DATETIME}" IMAGE_VERSION_SUFFIX[vardepsexclude] += "DATETIME" -IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}${IMAGE_VERSION_SUFFIX}" -IMAGE_LINK_NAME = "${IMAGE_BASENAME}-${MACHINE}" +IMAGE_NAME ?= "${IMAGE_BASENAME}-${MACHINE}${IMAGE_VERSION_SUFFIX}" +IMAGE_LINK_NAME ?= "${IMAGE_BASENAME}-${MACHINE}" # IMAGE_NAME is the base name for everything produced when building images. # The actual image that contains the rootfs has an additional suffix (.rootfsSignature · 1 line
2.17.1