mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-11 06:56:58 +02:00
Avoid overwriting /usr/{bin,sbin,lib64} symlinks.
This commit is contained in:
parent
bd07dceb60
commit
0dd9778b6e
@ -169,9 +169,18 @@ create_base_image() {
|
||||
# Locales and info pages
|
||||
usr/share/{i18n,info,locale}
|
||||
)
|
||||
|
||||
mkdir -p "${root_fs_dir}"/sbin "${root_fs_dir}"/lib64
|
||||
lbzip2 -dc "${LIBC_PATH}" | \
|
||||
sudo tar xpf - -C "${root_fs_dir}" ./usr/${CHOST} \
|
||||
--strip-components=3 "${libc_excludes[@]/#/--exclude=}"
|
||||
--strip-components=3 "${libc_excludes[@]/#/--exclude=}" \
|
||||
--exclude=${CHOST}/sbin --exclude=${CHOST}/lib64
|
||||
lbzip2 -dc "${LIBC_PATH}" | \
|
||||
sudo tar xpf - -C "${root_fs_dir}"/lib64 ./usr/${CHOST}/lib64 \
|
||||
--strip-components=4 "${libc_excludes[@]/#/--exclude=}"
|
||||
lbzip2 -dc "${LIBC_PATH}" | \
|
||||
sudo tar xpf - -C "${root_fs_dir}"/sbin ./usr/${CHOST}/sbin \
|
||||
--strip-components=4 "${libc_excludes[@]/#/--exclude=}"
|
||||
|
||||
board_ctarget=$(get_ctarget_from_board "${BOARD}")
|
||||
for atom in $(portageq match / cross-$board_ctarget/gcc); do
|
||||
|
@ -117,8 +117,14 @@ install_toolchain_in_board() {
|
||||
if [ "${CHOST}" != "$FLAGS_toolchain" ] ; then
|
||||
local libc_path="${PKGDIR}/cross-${FLAGS_toolchain}/${libc_tar}"
|
||||
cmds=(
|
||||
"mkdir -p '${BOARD_ROOT}/lib64' '${BOARD_ROOT}/sbin'"
|
||||
"tar jxpf '${libc_path}' -C '${BOARD_ROOT}' --exclude=lib \
|
||||
--exclude=${FLAGS_toolchain}/lib64 --exclude=${FLAGS_toolchain}/sbin \
|
||||
'./usr/${FLAGS_toolchain}' --strip-components=3"
|
||||
"tar jxpf '${libc_path}' -C '${BOARD_ROOT}/lib64' --exclude=lib \
|
||||
'./usr/${FLAGS_toolchain}/lib64' --strip-components=4"
|
||||
"tar jxpf '${libc_path}' -C '${BOARD_ROOT}/sbin' --exclude=lib \
|
||||
'./usr/${FLAGS_toolchain}/sbin' --strip-components=4"
|
||||
"mkdir -p '${BOARD_ROOT}/usr/lib/debug'"
|
||||
"tar jxpf '${libc_path}' -C '${BOARD_ROOT}/usr/lib/debug' \
|
||||
'./usr/lib/debug/usr/${FLAGS_toolchain}' --strip-components=6 \
|
||||
|
Loading…
Reference in New Issue
Block a user