From 4bee6cefea7504c1e0349a4e8a4245a71b4aefcd Mon Sep 17 00:00:00 2001 From: shenmo Date: Wed, 19 Nov 2025 16:34:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=9B=B4=E6=96=B0=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=BF=BD=E7=95=A5=E5=BA=94=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tool/update-upgrade/ss-update-notifier.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tool/update-upgrade/ss-update-notifier.sh b/tool/update-upgrade/ss-update-notifier.sh index 74281cb..d4c52b5 100755 --- a/tool/update-upgrade/ss-update-notifier.sh +++ b/tool/update-upgrade/ss-update-notifier.sh @@ -80,6 +80,18 @@ if [ "$update_app_number" -le 0 ]; then exit 0 fi +# 读取忽略列表到数组 +declare -A ignored_apps +if [ -f "/etc/spark-store/ignored_apps.conf" ]; then + while IFS='|' read -r pkg_name pkg_version || [ -n "$pkg_name" ]; do + # 去除前后空白字符 + pkg_name=$(echo "$pkg_name" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') + if [ -n "$pkg_name" ]; then + ignored_apps["$pkg_name"]=1 + fi + done < "/etc/spark-store/ignored_apps.conf" +fi + # 获取用户选择的要更新的应用 PKG_LIST="$(/opt/durapps/spark-store/bin/update-upgrade/ss-do-upgrade-worker.sh upgradable-list)" # 指定分隔符为 \n @@ -102,6 +114,13 @@ for line in $PKG_LIST; do PKG_STA=$(dpkg-query -W -f='${db:Status-Want}' $PKG_NAME) if [ "$PKG_STA" = "hold" ]; then let update_app_number=$update_app_number-1 + continue + fi + + # 检测是否在忽略列表中 + if [ -n "${ignored_apps[$PKG_NAME]}" ]; then + let update_app_number=$update_app_number-1 + continue fi done