From 29869dbb9d24eac29581b5ab34d035a5cd853254 Mon Sep 17 00:00:00 2001 From: shenmo Date: Sun, 27 Aug 2023 01:48:13 +0000 Subject: [PATCH 1/7] fix: Do not report error when aptss stuck Signed-off-by: shenmo --- tool/ssinstall | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tool/ssinstall b/tool/ssinstall index d674144..363b289 100755 --- a/tool/ssinstall +++ b/tool/ssinstall @@ -144,6 +144,14 @@ fi else echo "${TRANSHELL_CONTENT_WILL_NOT_DELETE_DEB}" +if dpkg -s "$package_name" >/dev/null 2>&1; then + echo "软件包已安装:$package_name" +else + echo "软件包未安装:$package_name" + echo "安装异常!抛出错误" +echo "OMG-IT-GOES-WRONG" +fi + fi else From 5d4ac6f523ccf01ca32106ecdeb8252468cd002e Mon Sep 17 00:00:00 2001 From: shenmo Date: Mon, 28 Aug 2023 23:42:25 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=20=20*=20=E4=BF=AE=E5=A4=8D=EF=BC=9Aaptss?= =?UTF-8?q?=E5=8A=A0=E9=94=81=E5=A4=B1=E8=B4=A5=E7=8E=B0=E5=9C=A8=E4=BC=9A?= =?UTF-8?q?=E6=AD=A3=E5=B8=B8=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 新增:在aptss的特定操作时添加了提示 * 新增:在aptss提示加粗 --- debian/changelog | 9 ++++++++ .../aptss/transhell/aptss_en_US.transhell | 1 + .../aptss/transhell/aptss_zh_CN.transhell | 1 + tool/aptss | 23 +++++++++++-------- 4 files changed, 24 insertions(+), 10 deletions(-) diff --git a/debian/changelog b/debian/changelog index e98c87f..ada0027 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +spark-store (4.2.7.1) stable; urgency=medium + + * 修复:aptss加锁失败现在会正常报错 + * 新增:在aptss的特定操作时添加了提示 + * 新增:在aptss提示加粗 + + -- shenmo Sun, 5 Mar 2022 11:45:14 +0800 + + spark-store (4.2.7) stable; urgency=medium * 修复:更新星火商店后禁止更新提醒的配置失效 diff --git a/pkg/usr/share/aptss/transhell/aptss_en_US.transhell b/pkg/usr/share/aptss/transhell/aptss_en_US.transhell index 28a9715..4178521 100644 --- a/pkg/usr/share/aptss/transhell/aptss_en_US.transhell +++ b/pkg/usr/share/aptss/transhell/aptss_en_US.transhell @@ -2,3 +2,4 @@ TRANSHELL_CONTENT_RUNNING_IN_NOT_ROOT_USER="W:Running in non-root mode! If error occurs, please try to excute me as root." TRANSHELL_CONTENT_INFO_SOURCES_LIST_D_IS_EMPTY="INFO:sources.list.d directory is empty,will not try to sync" TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST="Getting server and mirror lists..." +TRANSHELL_CONTENT_PLEASE_USE_APTSS_INSTEAD_OF_APT="Please note: Although the error message suggests using \"apt\" (such as \"apt install --fix-broken\"), please use \"aptss\" instead of \"apt\" when troubleshooting errors (for example, change to \"aptss install --fix-broken\")." diff --git a/pkg/usr/share/aptss/transhell/aptss_zh_CN.transhell b/pkg/usr/share/aptss/transhell/aptss_zh_CN.transhell index 1f16da5..8e51569 100644 --- a/pkg/usr/share/aptss/transhell/aptss_zh_CN.transhell +++ b/pkg/usr/share/aptss/transhell/aptss_zh_CN.transhell @@ -2,3 +2,4 @@ TRANSHELL_CONTENT_RUNNING_IN_NOT_ROOT_USER="警告:正在使用非root权限模式启动!若出现问题,请尝试使用root权限执行指令" TRANSHELL_CONTENT_INFO_SOURCES_LIST_D_IS_EMPTY="信息:sources.list.d文件夹是空的,将不会尝试同步" TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST="从服务器获取配置和镜像列表..." +TRANSHELL_CONTENT_PLEASE_USE_APTSS_INSTEAD_OF_APT="注意:尽管报错信息中提示使用apt(如apt install --fix-broken),请在排查错误的时候使用aptss而不是apt(对于例子,改为使用 aptss install --fix-broken)." diff --git a/tool/aptss b/tool/aptss index 21a6ae5..518e6eb 100755 --- a/tool/aptss +++ b/tool/aptss @@ -24,7 +24,7 @@ is_empty_dir(){ if [ "$(id -u)" != "0" ];then #############################无root权限时 -echo "${TRANSHELL_CONTENT_RUNNING_IN_NOT_ROOT_USER}" +echo -e "\e[1;32m${TRANSHELL_CONTENT_RUNNING_IN_NOT_ROOT_USER}\e[0m" else @@ -38,7 +38,7 @@ fi if [ ! -e "/tmp/aptss-conf/apt-fast.conf" ];then ###刷新apt-fast配置 mkdir -p /tmp/aptss-conf/ -echo "${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}" +echo -e "\e[1;32m${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}\e[0m" echo curl --progress-bar -o /tmp/aptss-conf/apt-fast.conf "https://d.store.deepinos.org.cn/apt-fast.conf" chmod -R 755 /tmp/aptss-conf @@ -49,7 +49,7 @@ fi if [ ! -e "/var/lib/aptss/lists/d.spark-app.store_${STORE_URL}_Packages" ] && [ ! -e "/var/lib/aptss/lists/d.store.deepinos.org.cn_${STORE_URL}_Packages" ] && [ ! -e "/var/lib/aptss/lists/mirrors.sdu.edu.cn_spark-store-repository_${STORE_URL}_Packages" ];then mkdir -p /tmp/aptss-conf/ -echo "${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}" +echo -e "\e[1;32m${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}\e[0m" echo curl --silent -o /tmp/aptss-conf/apt-fast.conf "https://d.store.deepinos.org.cn/apt-fast.conf" chmod -R 755 /tmp/aptss-conf @@ -73,7 +73,12 @@ if [ "$1" = "install" ] || [ "$1" = "upgrade" ] || [ "$1" = "full-upgrade" ] ; ###执行 ${SS_APT_FAST} "$@" --allow-downgrades -c /opt/durapps/spark-store/bin/apt-fast-conf/aptss-apt.conf - +EXIT_CODE=$? +if [ "$EXIT_CODE" != "0" ];then +echo -e "\e[1;33m$TRANSHELL_CONTENT_PLEASE_USE_APTSS_INSTEAD_OF_APT\e[0m" +exit +fi +unset EXIT_CODE elif [ "$1" = "download" ];then @@ -92,7 +97,7 @@ elif [ "$1" = "policy" ] || [ "$1" = "search" ];then elif [ "$1" = "ssupdate" ];then mkdir -p /tmp/aptss-conf/ -echo "${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}" +echo -e "\e[1;32m${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}\e[0m" echo curl --silent -o /tmp/aptss-conf/apt-fast.conf "https://d.store.deepinos.org.cn/apt-fast.conf" chmod -R 755 /tmp/aptss-conf @@ -105,12 +110,10 @@ apt update -c /opt/durapps/spark-store/bin/apt-fast-conf/aptss-apt.conf -o Dir:: #只更新星火源 elif [ "$1" = "update" ];then -curl --progress-bar -o /opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list "https://d.store.deepinos.org.cn/sparkstore${STORE_LIST_URL}.list" - - -mkdir -p /tmp/aptss-conf/ -echo "${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}" +echo -e "\e[1;32m${TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST}\e[0m" echo +curl --progress-bar -o /opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list "https://d.store.deepinos.org.cn/sparkstore${STORE_LIST_URL}.list" +mkdir -p /tmp/aptss-conf/ curl --progress-bar -o /tmp/aptss-conf/apt-fast.conf "https://d.store.deepinos.org.cn/apt-fast.conf" chmod -R 755 /tmp/aptss-conf ### 额外一份拿来给aptss自动补全用 From 766b7cd178b9c8d402a18ab247c1ac0fa66ac2c6 Mon Sep 17 00:00:00 2001 From: shenmo Date: Mon, 28 Aug 2023 23:45:23 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E8=B0=83=E6=95=B4=EF=BC=9A=E5=9B=A0?= =?UTF-8?q?=E4=B8=BAapt-fast=E8=BF=94=E5=9B=9E=E5=80=BC=E9=83=BD=E6=98=AF1?= =?UTF-8?q?,=E5=8F=AA=E5=A5=BD=E6=9A=82=E6=97=B6=E5=85=A8=E9=83=A8?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tool/aptss | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tool/aptss b/tool/aptss index 518e6eb..f9c9805 100755 --- a/tool/aptss +++ b/tool/aptss @@ -73,12 +73,10 @@ if [ "$1" = "install" ] || [ "$1" = "upgrade" ] || [ "$1" = "full-upgrade" ] ; ###执行 ${SS_APT_FAST} "$@" --allow-downgrades -c /opt/durapps/spark-store/bin/apt-fast-conf/aptss-apt.conf -EXIT_CODE=$? -if [ "$EXIT_CODE" != "0" ];then + echo -e "\e[1;33m$TRANSHELL_CONTENT_PLEASE_USE_APTSS_INSTEAD_OF_APT\e[0m" -exit -fi -unset EXIT_CODE + + elif [ "$1" = "download" ];then From e435cf66dc58360ccac567462ab68467246b1ba1 Mon Sep 17 00:00:00 2001 From: shenmo Date: Mon, 28 Aug 2023 23:48:58 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E9=99=8D=E4=BD=8E=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E7=AD=89=E7=BA=A7=E4=B8=BA=20=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/usr/share/aptss/transhell/aptss_en_US.transhell | 2 +- pkg/usr/share/aptss/transhell/aptss_zh_CN.transhell | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/usr/share/aptss/transhell/aptss_en_US.transhell b/pkg/usr/share/aptss/transhell/aptss_en_US.transhell index 4178521..b74b388 100644 --- a/pkg/usr/share/aptss/transhell/aptss_en_US.transhell +++ b/pkg/usr/share/aptss/transhell/aptss_en_US.transhell @@ -1,5 +1,5 @@ #!/bin/bash -TRANSHELL_CONTENT_RUNNING_IN_NOT_ROOT_USER="W:Running in non-root mode! If error occurs, please try to excute me as root." +TRANSHELL_CONTENT_RUNNING_IN_NOT_ROOT_USER="INFO:Running in non-root mode! If error occurs, please try to excute me as root." TRANSHELL_CONTENT_INFO_SOURCES_LIST_D_IS_EMPTY="INFO:sources.list.d directory is empty,will not try to sync" TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST="Getting server and mirror lists..." TRANSHELL_CONTENT_PLEASE_USE_APTSS_INSTEAD_OF_APT="Please note: Although the error message suggests using \"apt\" (such as \"apt install --fix-broken\"), please use \"aptss\" instead of \"apt\" when troubleshooting errors (for example, change to \"aptss install --fix-broken\")." diff --git a/pkg/usr/share/aptss/transhell/aptss_zh_CN.transhell b/pkg/usr/share/aptss/transhell/aptss_zh_CN.transhell index 8e51569..97d8e94 100644 --- a/pkg/usr/share/aptss/transhell/aptss_zh_CN.transhell +++ b/pkg/usr/share/aptss/transhell/aptss_zh_CN.transhell @@ -1,5 +1,5 @@ #!/bin/bash -TRANSHELL_CONTENT_RUNNING_IN_NOT_ROOT_USER="警告:正在使用非root权限模式启动!若出现问题,请尝试使用root权限执行指令" +TRANSHELL_CONTENT_RUNNING_IN_NOT_ROOT_USER="信息:正在使用非root权限模式启动!若出现问题,请尝试使用root权限执行指令" TRANSHELL_CONTENT_INFO_SOURCES_LIST_D_IS_EMPTY="信息:sources.list.d文件夹是空的,将不会尝试同步" TRANSHELL_CONTENT_GETTING_SERVER_CONFIG_AND_MIRROR_LIST="从服务器获取配置和镜像列表..." TRANSHELL_CONTENT_PLEASE_USE_APTSS_INSTEAD_OF_APT="注意:尽管报错信息中提示使用apt(如apt install --fix-broken),请在排查错误的时候使用aptss而不是apt(对于例子,改为使用 aptss install --fix-broken)." From 48028076a8a3033ab8adff7a040b118fda8a5321 Mon Sep 17 00:00:00 2001 From: shenmo Date: Thu, 31 Aug 2023 09:14:16 +0000 Subject: [PATCH 5/7] update debian/changelog. Signed-off-by: shenmo --- debian/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/changelog b/debian/changelog index ada0027..fa05cd1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ spark-store (4.2.7.1) stable; urgency=medium * 修复:aptss加锁失败现在会正常报错 * 新增:在aptss的特定操作时添加了提示 * 新增:在aptss提示加粗 + * 调整:ssinstall验证支持使用cdn.d.获取 -- shenmo Sun, 5 Mar 2022 11:45:14 +0800 From 2803d4b8da792d4cbfd31f18d6a6ac1a65104769 Mon Sep 17 00:00:00 2001 From: shenmo Date: Thu, 31 Aug 2023 09:26:59 +0000 Subject: [PATCH 6/7] update tool/ssinstall. Signed-off-by: shenmo --- tool/ssinstall | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tool/ssinstall b/tool/ssinstall index 363b289..500abe7 100755 --- a/tool/ssinstall +++ b/tool/ssinstall @@ -43,15 +43,15 @@ function zenity() function hash_check() { -if [ ! -e "/var/lib/aptss/lists/zunyun01.store.deepinos.org.cn_${STORE_URL}_Packages" ] && [ ! -e "/var/lib/aptss/lists/d.store.deepinos.org.cn_${STORE_URL}_Packages" ] && [ ! -e "/var/lib/aptss/lists/mirrors.sdu.edu.cn_spark-store-repository_${STORE_URL}_Packages" ];then +if [ ! -e "/var/lib/aptss/lists/cdn.d.store.deepinos.org.cn_${STORE_URL}_Packages" ] && [ ! -e "/var/lib/aptss/lists/d.store.deepinos.org.cn_${STORE_URL}_Packages" ] && [ ! -e "/var/lib/aptss/lists/mirrors.sdu.edu.cn_spark-store-repository_${STORE_URL}_Packages" ];then echo "接收星火仓库软件信息中..." aptss ssupdate fi ### 选择包信息位置 -if [ -e "/var/lib/aptss/lists/zunyun01.store.deepinos.org.cn_${STORE_URL}_Packages" ];then -PACKAGES_DATA_PATH="/var/lib/aptss/lists/zunyun01.store.deepinos.org.cn_${STORE_URL}_Packages" +if [ -e "/var/lib/aptss/lists/cdn.d.store.deepinos.org.cn_${STORE_URL}_Packages" ];then +PACKAGES_DATA_PATH="/var/lib/aptss/lists/cdn.d.store.deepinos.org.cn_${STORE_URL}_Packages" echo "星火仓库的Packages位置为 $PACKAGES_DATA_PATH,是星火域名单目录仓库配置" elif [ -e "/var/lib/aptss/lists/d.store.deepinos.org.cn_${STORE_URL}_Packages" ];then PACKAGES_DATA_PATH="/var/lib/aptss/lists/d.store.deepinos.org.cn_${STORE_URL}_Packages" From 407ec6b57332af9d1b7dd8ff02ea7decf38efbcb Mon Sep 17 00:00:00 2001 From: shenmo Date: Thu, 31 Aug 2023 11:30:17 +0000 Subject: [PATCH 7/7] update debian/spark-store.postinst. Signed-off-by: shenmo --- debian/spark-store.postinst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/debian/spark-store.postinst b/debian/spark-store.postinst index e681b13..dae15a1 100755 --- a/debian/spark-store.postinst +++ b/debian/spark-store.postinst @@ -10,8 +10,7 @@ case "$1" in ;; aarch64) - echo "Enabling armhf arch..." - dpkg --add-architecture armhf + echo "Will not enable armhf since 4271" ;; *)