Skip to content

Commit 9f80f2d

Browse files
[slave.mk] record the package versions by expanding the list of dependencies (#8730)
- Why I did it docker-orchagent was missing libsairedis version label. E.g. Currently only swsscommon is recorded in the labels: admin@arc-switch1038:~$ docker inspect docker-orchagent | grep versions "com.azure.sonic.versions.libswsscommon": "1.0.0" With this change libsairedis is also recorded: admin@arc-switch1038:~$ docker inspect docker-orchagent | grep versions "com.azure.sonic.versions.libswsscommon": "1.0.0" "com.azure.sonic.versions.libsairedis": "1.0.0" - How I did it By expanding the list of dependencies. - How to verify it Build and verify the label for libsairedis exists in docker-orchagent. Signed-off-by: Stepan Blyschak <[email protected]>
1 parent ac8fd0d commit 9f80f2d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

slave.mk

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,10 @@ $(addprefix $(TARGET_PATH)/, $(DOCKER_IMAGES)) : $(TARGET_PATH)/%.gz : .platform
786786
$(eval export $(subst -,_,$(notdir $($*.gz_PATH)))_pkgs=$(shell printf "$(subst $(SPACE),\n,$(call expand,$($*.gz_APT_PACKAGES)))\n" | awk '!a[$$0]++'))
787787
if [ -d $($*.gz_PATH)/cli-plugin-tests/ ]; then pushd $($*.gz_PATH)/cli-plugin-tests; pytest-$($(SONIC_UTILITIES_PY3)_PYTHON_VERSION) -v $(LOG); popd; fi
788788
# Label docker image with componenets versions
789-
$(eval export $(subst -,_,$(notdir $($*.gz_PATH)))_labels=$(foreach component,$($*.gz_DEPENDS) $($*.gz_PYTHON_DEBS) $($*.gz_PYTHON_WHEELS),\
789+
$(eval export $(subst -,_,$(notdir $($*.gz_PATH)))_labels=$(foreach component,\
790+
$(call expand,$($*.gz_DEPENDS),RDEPENDS) \
791+
$(call expand,$($*.gz_PYTHON_DEBS)) \
792+
$(call expand,$($*.gz_PYTHON_WHEELS)),\
790793
$(shell [[ ! -z "$($(component)_VERSION)" && ! -z "$($(component)_NAME)" ]] && \
791794
echo "--label com.azure.sonic.versions.$($(component)_NAME)=$($(component)_VERSION)")))
792795
j2 $($*.gz_PATH)/Dockerfile.j2 > $($*.gz_PATH)/Dockerfile

0 commit comments

Comments
 (0)