repo-list: fix build issue with eos distribution

armbian repo doesn't existed in eos distribution, which makes `apt update` fail.
This commit is contained in:
hzy 2024-03-04 00:54:08 +08:00 committed by Igor
parent 2cd46aceb5
commit 1d31aac7a9
1 changed files with 4 additions and 2 deletions

View File

@ -215,8 +215,10 @@ function create_sources_list_and_deploy_repo_key() {
# replace local package server if defined. Suitable for development
[[ -n $LOCAL_MIRROR ]] && echo "deb ${SIGNED_BY}http://$LOCAL_MIRROR $RELEASE ${components[*]}" > "${basedir}"/etc/apt/sources.list.d/armbian.list
# disable repo if SKIP_ARMBIAN_REPO==yes, or if when==image-early.
if [[ "${when}" == "image-early" || "${SKIP_ARMBIAN_REPO}" == "yes" ]]; then
# disable repo if DISTRIBUTION_STATUS==eos, or if SKIP_ARMBIAN_REPO==yes, or if when==image-early.
if [[ "${when}" == "image-early" || \
"$(cat "${SRC}/config/distributions/${RELEASE}/support")" == "eos" || \
"${SKIP_ARMBIAN_REPO}" == "yes" ]]; then
display_alert "Disabling Armbian repo" "${ARCH}-${RELEASE} :: skip:${SKIP_ARMBIAN_REPO:-"no"} when:${when}" "info"
mv "${SDCARD}"/etc/apt/sources.list.d/armbian.list "${SDCARD}"/etc/apt/sources.list.d/armbian.list.disabled
fi