From 5de2b4acd4254b97fe8f981bdc0415e8196a7481 Mon Sep 17 00:00:00 2001 From: xumia Date: Thu, 3 Nov 2022 01:14:26 +0000 Subject: [PATCH 1/3] [Build] Fix the docker-sync not found issue --- slave.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/slave.mk b/slave.mk index ec484af94489..22f708ea4799 100644 --- a/slave.mk +++ b/slave.mk @@ -453,8 +453,10 @@ define docker-image-save docker tag $(1)-$(DOCKER_USERNAME):$(DOCKER_USERTAG) $(1):latest $(LOG) @echo "Saving docker image $(1):latest" $(LOG) docker save $(1):latest | gzip -c > $(2) - @echo "Removing docker image $(1):latest" $(LOG) - docker rmi -f $(1):latest $(LOG) + if [ x$(SONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILD) == x"y" ]; then + @echo "Removing docker image $(1):latest" $(LOG) + docker rmi -f $(1):latest $(LOG) + fi $(call MOD_UNLOCK,$(1)) @echo "Released docker image lock for $(1) save" $(LOG) @echo "Removing docker image $(1)-$(DOCKER_USERNAME):$(DOCKER_USERTAG)" $(LOG) From 028492dd48423d6b87513e7559e383c6c9df84e9 Mon Sep 17 00:00:00 2001 From: xumia Date: Fri, 4 Nov 2022 14:33:50 +0000 Subject: [PATCH 2/3] Fix the docker-sync not loaded issue --- slave.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/slave.mk b/slave.mk index 22f708ea4799..4ab2abb8851f 100644 --- a/slave.mk +++ b/slave.mk @@ -478,8 +478,10 @@ define docker-image-load docker load -i $(TARGET_PATH)/$(1).gz $(LOG) @echo "Tagging docker image $(1):latest as $(1)-$(DOCKER_USERNAME):$(DOCKER_USERTAG)" $(LOG) docker tag $(1):latest $(1)-$(DOCKER_USERNAME):$(DOCKER_USERTAG) $(LOG) - @echo "Removing docker image $(1):latest" $(LOG) - docker rmi -f $(1):latest $(LOG) + if [ x$(SONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILD) == x"y" ]; then + @echo "Removing docker image $(1):latest" $(LOG) + docker rmi -f $(1):latest $(LOG) + if [ x$(SONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILD) == x"y" ]; then $(call MOD_UNLOCK,$(1)) @echo "Released docker image lock for $(1) load" $(LOG) endef From 955d50722e6cc1e4ef3ebd2d1e921da37a4ba1d0 Mon Sep 17 00:00:00 2001 From: xumia Date: Sat, 5 Nov 2022 01:13:38 +0000 Subject: [PATCH 3/3] Fix syntax error --- slave.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slave.mk b/slave.mk index 4ab2abb8851f..c358e965fabf 100644 --- a/slave.mk +++ b/slave.mk @@ -481,7 +481,7 @@ define docker-image-load if [ x$(SONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILD) == x"y" ]; then @echo "Removing docker image $(1):latest" $(LOG) docker rmi -f $(1):latest $(LOG) - if [ x$(SONIC_CONFIG_USE_NATIVE_DOCKERD_FOR_BUILD) == x"y" ]; then + fi $(call MOD_UNLOCK,$(1)) @echo "Released docker image lock for $(1) load" $(LOG) endef