From 1d31aac7a959ab43fcc1f87b8f06e92c7bb7f4e6 Mon Sep 17 00:00:00 2001 From: hzy Date: Mon, 4 Mar 2024 00:54:08 +0800 Subject: [PATCH] repo-list: fix build issue with eos distribution armbian repo doesn't existed in eos distribution, which makes `apt update` fail. --- lib/functions/rootfs/distro-specific.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/functions/rootfs/distro-specific.sh b/lib/functions/rootfs/distro-specific.sh index 69cca57521..31c93d4c20 100644 --- a/lib/functions/rootfs/distro-specific.sh +++ b/lib/functions/rootfs/distro-specific.sh @@ -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