mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-05 04:06:33 +02:00
fix(setup_board): Migrate packages in existing board roots.
This commit is contained in:
parent
0d29e73534
commit
9a973e4113
17
setup_board
17
setup_board
@ -214,6 +214,23 @@ else
|
||||
FLAGS_regen_configs=${FLAGS_FALSE}
|
||||
fi
|
||||
|
||||
# Migrate board roots that were created before the package location
|
||||
# was standardized to /var/lib/portage/pkgs, build_image will fail if we
|
||||
# simply forget about the old location and start writing to the new.
|
||||
# Keep /packages as a compatibility symlink until everyone is updated.
|
||||
if [[ ! -L "${BOARD_ROOT}/packages" ]]; then
|
||||
if [[ ! -d "${BOARD_ROOT}/var/lib/portage/pkgs" ]]; then
|
||||
if [[ -d "${BOARD_ROOT}/packages" ]]; then
|
||||
warn "Moving board package directory to ${BOARD_ROOT}/var/lib/portage/pkgs"
|
||||
sudo mkdir -p "${BOARD_ROOT}/var/lib/portage"
|
||||
sudo mv "${BOARD_ROOT}/packages" "${BOARD_ROOT}/var/lib/portage/pkgs"
|
||||
fi
|
||||
else
|
||||
sudo mkdir -p "${BOARD_ROOT}/var/lib/portage/pkgs"
|
||||
fi
|
||||
sudo ln -sfT "var/lib/portage/pkgs" "${BOARD_ROOT}/packages"
|
||||
fi
|
||||
|
||||
info "Configuring portage in ${BOARD_ROOT}"
|
||||
cmds=(
|
||||
"mkdir -p '${BOARD_ROOT}' '${BOARD_PROFILE}'"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user