From 7758f8e5dbb40959a87a40106780a9e4fbdda485 Mon Sep 17 00:00:00 2001 From: Liu Shilong Date: Tue, 20 Dec 2022 16:40:10 +0800 Subject: [PATCH] [build] Fix unexpected warnings: No names found, cannot describe anything. (#12963) Why I did it In PR check pipelines, there are too many duplicated warnings: fatal: No names found, cannot describe anything. SONIC_IMAGE_VERSION will not change in one build. We don't need to calculate in every reference. We just need calculate one time, then record it. In Makefile, '=' will calculate again and again when it is referred. How I did it Fix it in Makefile. How to verify it Check this PR's check pipeline result. --- slave.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slave.mk b/slave.mk index 86f28424271f..0cb2cd894491 100644 --- a/slave.mk +++ b/slave.mk @@ -11,7 +11,7 @@ UID = $(shell id -u) GUID = $(shell id -g) ifeq ($(SONIC_IMAGE_VERSION),) - override SONIC_IMAGE_VERSION = $(shell export BUILD_TIMESTAMP=$(BUILD_TIMESTAMP) && export BUILD_NUMBER=$(BUILD_NUMBER) && . functions.sh && sonic_get_version) + override SONIC_IMAGE_VERSION := $(shell export BUILD_TIMESTAMP=$(BUILD_TIMESTAMP) && export BUILD_NUMBER=$(BUILD_NUMBER) && . functions.sh && sonic_get_version) endif .SECONDEXPANSION: