-
Notifications
You must be signed in to change notification settings - Fork 0
Fix ASAN build clobbering packages after build on the same system #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
6a5b8fa
35db3ab
531edd4
268b420
6ee4ff5
3b42208
e62785d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,9 +2,16 @@ | |||||||
|
|
||||||||
| ifneq ($(CONFIGURED_PLATFORM),vs) | ||||||||
|
|
||||||||
| ifeq ($(ENABLE_ASAN), y) | ||||||||
| SYNCD = syncd-asan_1.0.0_$(CONFIGURED_ARCH).deb | ||||||||
|
||||||||
| SYNCD = syncd-asan_1.0.0_$(CONFIGURED_ARCH).deb | |
| SYNCD = syncd-asan_1.0.0_$(CONFIGURED_ARCH).deb | |
| $(SYNCD)_DPKG_DEB_NAME = syncd_1.0.0_$(CONFIGURED_ARCH).deb |
Copilot
AI
Apr 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ASAN-specific debug package target is renamed to syncd-asan-dbgsym_..., but there is no <deb>_DPKG_DEB_NAME mapping for the produced dbgsym .deb name. Unless the underlying packaging changes the dbgsym artifact name, slave.mk will not be able to move/rename it correctly. Add $(SYNCD_DBG)_DPKG_DEB_NAME for the ASAN case to match the dpkg output filename.
| SYNCD_DBG = syncd-asan-dbgsym_1.0.0_$(CONFIGURED_ARCH).deb | |
| SYNCD_DBG = syncd-asan-dbgsym_1.0.0_$(CONFIGURED_ARCH).deb | |
| $(SYNCD_DBG)_DPKG_DEB_NAME = syncd-dbgsym_1.0.0_$(CONFIGURED_ARCH).deb |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -860,7 +860,7 @@ $(addprefix $(DEBS_PATH)/, $(SONIC_DPKG_DEBS)) : $(DEBS_PATH)/% : .platform $$(a | |||||||||||||||||||||||||||||||||||||||||
| # Clean up | ||||||||||||||||||||||||||||||||||||||||||
| if [ -f $($*_SRC_PATH).patch/series ]; then pushd $($*_SRC_PATH) && quilt pop -a -f; [ -d .pc ] && rm -rf .pc; popd; fi | ||||||||||||||||||||||||||||||||||||||||||
| # Take built package(s) | ||||||||||||||||||||||||||||||||||||||||||
| mv -f $(addprefix $($*_SRC_PATH)/../, $* $($*_DERIVED_DEBS) $($*_EXTRA_DEBS)) $(DEBS_PATH) $(LOG) | ||||||||||||||||||||||||||||||||||||||||||
| $(foreach deb,$* $($*_DERIVED_DEBS) $($*_EXTRA_DEBS),mv -f $($*_SRC_PATH)/../$(or $($(deb)_DPKG_DEB_NAME),$(deb)) $(DEBS_PATH)/$(deb) $(LOG) ;) | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
| $(foreach deb,$* $($*_DERIVED_DEBS) $($*_EXTRA_DEBS),mv -f $($*_SRC_PATH)/../$(or $($(deb)_DPKG_DEB_NAME),$(deb)) $(DEBS_PATH)/$(deb) $(LOG) ;) | |
| $(foreach deb,$* $($*_DERIVED_DEBS) $($*_EXTRA_DEBS), \ | |
| deb='$(deb)'; \ | |
| src_deb_name='$(or $($(deb)_DPKG_DEB_NAME),$(deb))'; \ | |
| src_deb="$($*_SRC_PATH)/../$$src_deb_name"; \ | |
| if [ -f "$$src_deb" ]; then \ | |
| mv -f "$$src_deb" "$(DEBS_PATH)/$$deb" $(LOG); \ | |
| else \ | |
| shopt -s nullglob; \ | |
| deb_suffix="_$${deb#*_}"; \ | |
| candidates=("$($*_SRC_PATH)/../"*"$${deb_suffix}"); \ | |
| shopt -u nullglob; \ | |
| if [ "$${#candidates[@]}" -eq 1 ]; then \ | |
| mv -f "$${candidates[0]}" "$(DEBS_PATH)/$$deb" $(LOG); \ | |
| else \ | |
| echo "Unable to resolve built deb for $$deb (expected $$src_deb_name, candidates: $${candidates[*]:-none})" >&2; \ | |
| exit 1; \ | |
| fi; \ | |
| fi; \ | |
| ) |
Uh oh!
There was an error while loading. Please reload this page.