From b8d44e6fb8a179022f44789693e76aff299d81de Mon Sep 17 00:00:00 2001 From: Justin Sherman Date: Mon, 8 May 2023 08:33:58 -0700 Subject: [PATCH] [build] SONIC_ONLINE_DEBS no longer overwrites local build outputs (#14822) Manual double commit of #14698 --- slave.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slave.mk b/slave.mk index 3d3b0b7216..cdae1b4cf7 100644 --- a/slave.mk +++ b/slave.mk @@ -488,8 +488,8 @@ $(addprefix $(DEBS_PATH)/, $(SONIC_ONLINE_DEBS)) : $(DEBS_PATH)/% : .platform \ # Load the target deb from DPKG cache $(call LOAD_CACHE,$*,$@) - # Skip building the target if it is already loaded from cache - if [ -z '$($*_CACHE_LOADED)' ] ; then + # Skip building the target if it is already loaded from cache or exists in target/ directory + if [ -z '$($*_CACHE_LOADED)' ] && [ ! -e $(DEBS_PATH)/$* ] ; then $(foreach deb,$* $($*_DERIVED_DEBS), \ { curl -L -f -o $(DEBS_PATH)/$(deb) $($(deb)_CURL_OPTIONS) $($(deb)_URL) $(LOG) || { exit 1 ; } } ; )