浏览代码

image-artifact-names: make variables overridable

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.

Signed-off-by: Jens Rehsack <sno@netbsd.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Jens Rehsack 3 年之前
父节点
当前提交
d0f18376dc
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      meta/classes/image-artifact-names.bbclass

+ 4 - 4
meta/classes/image-artifact-names.bbclass

@@ -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