mirror of
https://github.com/flatcar/scripts.git
synced 2026-04-15 18:41:28 +02:00
overlay profiles: Remove debug build-id symlinks broken by INSTALL_MASK
Otherwise they trip our QA check, which fails the build. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
This commit is contained in:
parent
d32cf515b0
commit
7097436580
@ -124,6 +124,19 @@ cros_pre_pkg_setup_sysroot_build_bin_dir() {
|
||||
PATH+=":${CROS_BUILD_BOARD_BIN}"
|
||||
}
|
||||
|
||||
# Remove any debug build-id symlinks that are broken because of INSTALL_MASK,
|
||||
# and also remove their associated debug files to avoid wasting space.
|
||||
cros_post_pkg_preinst_rm_masked_debug_files() {
|
||||
local link debug dir=${ED}/usr/lib/debug
|
||||
[[ -d ${dir}/.build-id ]] || return
|
||||
while read -d $'\n' -r link; do
|
||||
debug=$(realpath "${link}.debug") || die
|
||||
rm -f -- "${link}" "${link}.debug" "${debug}" || die
|
||||
done < <(find "${dir}"/.build-id -xtype l ! -name "*.debug")
|
||||
# -delete implies -depth so entire empty trees are deleted.
|
||||
find "${dir}" -type d -empty -delete || die
|
||||
}
|
||||
|
||||
# Avoid modifications of the preexisting users - these are provided by
|
||||
# our baselayout and usermod can't change anything there anyway (it
|
||||
# complains that the user is not in /etc/passwd).
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user