If the user has wanted to avoid complementary symbolic link creation by
setting IMAGE_LINK_NAME value to empty string, then he/she needs to
override the value of IMAGE_NAME name as well in order to avoid build
breakage.

Mitigate the issue by placing the common segment in a separate variable
which is referenced in default values of both IMAGE_NAME and
IMAGE_LINK_NAME.

Signed-off-by: Niko Mauno <[email protected]>
---
 meta/classes-recipe/image-artifact-names.bbclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/classes-recipe/image-artifact-names.bbclass 
b/meta/classes-recipe/image-artifact-names.bbclass
index bc76ff0e16..8acdc16072 100644
--- a/meta/classes-recipe/image-artifact-names.bbclass
+++ b/meta/classes-recipe/image-artifact-names.bbclass
@@ -11,8 +11,9 @@
 IMAGE_BASENAME ?= "${PN}"
 IMAGE_VERSION_SUFFIX ?= "-${DATETIME}"
 IMAGE_VERSION_SUFFIX[vardepsexclude] += "DATETIME SOURCE_DATE_EPOCH"
-IMAGE_NAME ?= "${IMAGE_LINK_NAME}${IMAGE_VERSION_SUFFIX}"
-IMAGE_LINK_NAME ?= 
"${IMAGE_BASENAME}${IMAGE_MACHINE_SUFFIX}${IMAGE_NAME_SUFFIX}"
+IMAGE_NAME_BASE ?= 
"${IMAGE_BASENAME}${IMAGE_MACHINE_SUFFIX}${IMAGE_NAME_SUFFIX}"
+IMAGE_NAME ?= "${IMAGE_NAME_BASE}${IMAGE_VERSION_SUFFIX}"
+IMAGE_LINK_NAME ?= "${IMAGE_NAME_BASE}"
 
 # This needs to stay in sync with IMAGE_LINK_NAME, but with INITRAMFS_IMAGE 
instead of IMAGE_BASENAME
 # and without ${IMAGE_NAME_SUFFIX} which all initramfs images should set to 
empty
-- 
2.39.5

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#209804): 
https://lists.openembedded.org/g/openembedded-core/message/209804
Mute This Topic: https://lists.openembedded.org/mt/110609362/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to