File tree Expand file tree Collapse file tree
sdk_container/src/third_party/coreos-overlay/profiles/coreos/base Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -124,6 +124,18 @@ cros_pre_pkg_setup_sysroot_build_bin_dir() {
124124 PATH+=":${CROS_BUILD_BOARD_BIN}"
125125}
126126
127+ # Remove any debug build-id symlinks that are broken because of INSTALL_MASK,
128+ # and also remove their associated debug files to avoid wasting space.
129+ cros_post_pkg_preinst_rm_masked_debug_files() {
130+ local link debug dir=${ED}/usr/lib/debug
131+ [[ -d ${dir}/.build-id ]] || return
132+ while read -d $'\n' -r link; do
133+ debug=$(realpath "${link}.debug") || die
134+ rm -f -- "${link}" "${link}.debug" "${debug}" || die
135+ done < <(find "${dir}"/.build-id -xtype l ! -name "*.debug")
136+ find "${dir}" -type d -empty -delete || die
137+ }
138+
127139# Avoid modifications of the preexisting users - these are provided by
128140# our baselayout and usermod can't change anything there anyway (it
129141# complains that the user is not in /etc/passwd).
You can’t perform that action at this time.
0 commit comments